mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
08fddb6598
The AON RTC CH1 event handler aims to schedule the next compare event on the next 512 RTC counter boundary. However, the current calculation of "now" takes place too early within the interrupt handler. In some cases, this results in the next event getting scheduled too soon in the future or on some extreme cases even in the past. AON RTC compare events cannot happen within 2 SCLK_LF cycles after a clearance (4 RTC ticks in the 16.16 format). Thus, if the next 512 boundary is too soon (5 ticks for margin), we skip it altogether. When this happens, etimers that would have expired on the skipped tick will expire 1 tick later instead. Skipping a tick has no negative impact on our s/w clock counter, since this is always derived directly from the hardware counter. |
||
---|---|---|
.. | ||
batmon-sensor.c | ||
batmon-sensor.h | ||
cc26xx-uart.c | ||
cc26xx-uart.h | ||
contiki-watchdog.c | ||
gpio-interrupt.c | ||
gpio-interrupt.h | ||
oscillators.c | ||
oscillators.h | ||
soc-rtc.c | ||
soc-rtc.h | ||
uart1.h |