nrf: add ticks (not subticks) to overflow count during reset
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
296ba101ec
commit
e470376c12
|
@ -225,7 +225,7 @@ void reset_cpu(void) {
|
||||||
// We're getting ready to reset, so save the counter off.
|
// We're getting ready to reset, so save the counter off.
|
||||||
// This counter will get reset to zero during the reboot.
|
// This counter will get reset to zero during the reboot.
|
||||||
uint32_t ticks = nrfx_rtc_counter_get(&rtc_instance);
|
uint32_t ticks = nrfx_rtc_counter_get(&rtc_instance);
|
||||||
overflow_tracker.overflowed_ticks += ticks;
|
overflow_tracker.overflowed_ticks += ticks / 32;
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue