Skip to content
Commit 06ae95e4 authored by Andrzej Głąbek's avatar Andrzej Głąbek Committed by Carles Cufí
Browse files

drivers: nrf_rtc_timer: Always set an initial timeout



In the tickless kernel mode, the nRF system timer does not schedule
any timeout on initialization. This can lead to a situation that
for certain applications no timeout is scheduled at all (for example,
when an application does not create any threads, it exits `main()`
without any sleeping and only handles interrupts) and in consequence
`sys_clock_announce()` is never called (the nRF system timer calls
this function only from the timeout handler). This in turn causes that
uptime is reported correctly only until the RTC used as the system
timer overflows (what happens after 512 seconds).

Fix this by setting a maximum allowed timeout when initializing
the nRF system timer for the tickless kernel mode.

Signed-off-by: default avatarAndrzej Głąbek <andrzej.glabek@nordicsemi.no>
parent f72d8ffe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment