Caution with OSTimeGet
In the OCSDK some of µC/OS-II's low-level timer functions have been modified to enable low-power "tickless" operation.
µC/OS-II's OSTimeGet
function normally returns a 32-bit result in milliseconds of uptime, so it is expected to rollover every 49 days. In our implementation, it is based on the 32 kHz system clock with units of ~ 30 µs, so it rolls over every 36 hours.
When timing events, it is preferable to use the dn_getSystemTime
function, which returns a 64-bit result in 32 kHz ticks. dn_getSystemTime
rolls over every ~18 million years.