summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2024-11-27 16:57:02 +0100
committerDamien George <damien@micropython.org>2024-11-28 23:02:46 +1100
commitda692d01ac6c09286ee682c0d4a3780777c67a8f (patch)
treeb3e438967a7485561523beb976798718c96375df
parente70048cf5934bf3db65ec7a1b6490635716282f5 (diff)
nrf/drivers/ticker: Reset slow ticker callback count on soft reboot.
The micro:bit board (and probably other boards using the music or display module) locked up on soft reboot. Reason was a buffer overflow caused by an index counter, which was not reset on soft_reboot. That's fixed in this commit. Tested with a micro:bit board, performing a series of soft reboots. Signed-off-by: robert-hh <robert@hammelrath.com>
-rw-r--r--ports/nrf/drivers/ticker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/nrf/drivers/ticker.c b/ports/nrf/drivers/ticker.c
index c2fa31e7c..e9c07c842 100644
--- a/ports/nrf/drivers/ticker.c
+++ b/ports/nrf/drivers/ticker.c
@@ -62,6 +62,7 @@ void ticker_init0(void) {
#else
NRFX_IRQ_PRIORITY_SET(FastTicker_IRQn, 2);
#endif
+ m_num_of_slow_tickers = 0;
NRFX_IRQ_PRIORITY_SET(SlowTicker_IRQn, 3);