[riot-notifications] [RIOT-OS/RIOT] xtimer: hang on xtimer_spin_until (corner case) (#11149)

vac notifications at github.com
Wed Mar 13 00:35:32 CET 2019

I just found out that when I'm using 32768 Hz for my xtimer, the `_xtimer_lltimer_now()` function takes over 120us on samd21  - which is about 4 cycles of xtimer. So when the `target` is close to the uint32 limits then there a risk that target value will be omitted is much higher and from time to time device will spin for much longer than it should.

We may minimize (but not eliminate) the risk of this issue by changing `timer_read()` implementation so it won't take so long (on samd21 - most of the time is taken by synchro wait loop there).

I think that the right solution is to change these two while loops with something more robust.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190312/a08f7bfe/attachment-0001.html>

More information about the notifications mailing list