nrf: add ticks (not subticks) to overflow count during reset

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-05-23 11:26:27 +08:00
parent 296ba101ec
commit e470376c12
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}