drivers: timer: extend nrf_rtc_timer
This commit introduces the following changes: * nrf_rtc_timer is extended with a capability to handle RTC overflow, allowing it to operate on absolute RTC ticks, rather than relative ticks. * overflow handling is ZLI-proof and relies on the sys clock handler being executed twice every RTC counter's overflow. * callbacks are given an absolute RTC tick value as a parameter instead of CC register's value. The absolute RTC tick value is the RTC counter value set during CC channel configuration extended to 64 bits. * in case the timer's target time is in the past or is the current tick, the timer fires as soon as possible, however still from the RTC's ISR context. * in case an active timer is set again with the same target time, it is not scheduled again - only its event data is updated. Otherwise, the timer is scheduled as usual. * a scheduled timer can be aborted. * system clock functions are now using 64 bit values internally. Signed-off-by:Andrzej Kuroś <andrzej.kuros@nordicsemi.no> Signed-off-by:
Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no> Signed-off-by:
Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no> Signed-off-by:
Paweł Kwiek <pawel.kwiek@nordicsemi.no>
Loading
Please sign in to comment