1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00
Joakim Nohlgård b365ab45cb sys/xtimer: Avoid race incrementing multiple periods in _timer_callback
On a fast CPU with a slow timer (e.g. XTIMER_SHIFT > 0) it is possible
that now == _xtimer_now() when spinning for the overflow. In the extreme
case When this happens _next_period() will be called more than once
until the timer overflows for real.

Fault observed in real life when running on a 32.768 kHz timer on a
~96 MHz clocked mulle (Kinetis K60, Cortex-M4). _next_period() was
called 9 times during the same ISR call before the 32 kHz timer
overflowed.
2015-09-30 10:21:33 +02:00
..
2015-09-23 18:55:11 +02:00
2015-07-07 17:49:17 +02:00
2015-09-22 11:01:55 +02:00
2014-09-12 11:50:12 +02:00
2015-09-16 10:58:51 +02:00
2015-09-25 00:05:18 +02:00
2015-09-03 11:49:57 +02:00
2014-12-03 20:18:37 +01:00
2015-09-16 10:58:51 +02:00
2015-08-21 23:30:04 +02:00
2014-08-23 16:16:26 +02:00
2015-09-22 22:24:52 +02:00