[riot-notifications] [RIOT-OS/RIOT] Timer gets disabled after interrupt (#11526)

Kaspar Schleiser notifications at github.com
Wed May 15 00:09:16 CEST 2019


> I am not sure, if this is a bug, or intentional feature, but on timer interrupt the bellow line would disable any future interrupts

That is intentional. The file is part of the periph/timer implementation, which allows only one active timer at a time (it is a slim abstraction of hardware timers).

The corresponding ```timer_set_absolute()``` enables the interrupt, e.g. here:

https://github.com/RIOT-OS/RIOT/blob/e4bc5d4718558ad308625b30841ee523dc136042/cpu/samd21/periph/timer.c#L147

If the timer enable flag wouldn't be disabled, the same callback would be re-executed every time the timer has overflowed and counted back up to the compare value.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11526#issuecomment-492428560
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190514/81d28df0/attachment.html>


More information about the notifications mailing list