From e470376c126828c768dfbcf25430869e8bc2b021 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sat, 23 May 2020 11:26:27 +0800 Subject: [PATCH] nrf: add ticks (not subticks) to overflow count during reset Signed-off-by: Sean Cross --- ports/nrf/supervisor/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 5c76f6aa11..aee2d63e1d 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -225,7 +225,7 @@ void reset_cpu(void) { // We're getting ready to reset, so save the counter off. // This counter will get reset to zero during the reboot. uint32_t ticks = nrfx_rtc_counter_get(&rtc_instance); - overflow_tracker.overflowed_ticks += ticks; + overflow_tracker.overflowed_ticks += ticks / 32; NVIC_SystemReset(); }