The cortex m0's systick driver uses a ticks global to accumulate timer overflows. This counter is incremented in the _systick() irq handler. current_time() and current_time_hires() rely on ticks being updated as a way of detecting overflows. If those functions are called with interrupts disabled, the counter can roll without detection. This manifests as time appearing to go backwards.
The cortex m0's systick driver uses a
ticks
global to accumulate timer overflows. This counter is incremented in the_systick()
irq handler.current_time()
andcurrent_time_hires()
rely onticks
being updated as a way of detecting overflows. If those functions are called with interrupts disabled, the counter can roll without detection. This manifests as time appearing to go backwards.