- Fri Jan 24, 2020 7:10 am
Information on the RTC clock is a bit hard to come by but I found the information on the system_get_rtc_time call which indicates the period of the RTC is approximately 5.75uS or 173kHz which makes sense for the range of a slow speed RTC clock.
If one now takes a 31 bit counter (2147483648) then this would give a maximum period of 12,348 seconds or 3.4 hours.
So my improved guess of what is going on is that the sleep time in microseconds is converted into RTC periods and then used to either set a comparison value for the RTC time when sleep should end or set up a counter. RTC time is actually an unsigned 32 bit value but maybe there was a hardware reason why the sleep was restricted to 31 bits of RTC.