You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix potential rollover edgecase in SysTick extended mode (#13)
Previously it was possible for us to have read a SYSTICK value just
before overflow, have the rollover happen & exception fire, incrementing
ROLLOVER_COUNT, resulting in a count off by a full 2**24. Now, we do two
reads of the systick counter with ROLLOVER_COUNT read between them. We
can now check if a rollover happened sometime between the two reads. If
it has, we know to use the second reading and re-read ROLLOVER_COUNT to
make sure we have the incremented value. If we didn't see any rollover,
we're happy and use the first readings of the SYSTICK and
ROLLOVER_COUNT.
0 commit comments