Closed tyler-potyondy closed 7 months ago
Just to be clear. Are you saying that in userspace (libtock-c) the time in seconds is wrapping or the ticks return from the kernel are wrapping?
If it's the first we should fix it in libtock-c. If it's the second there isn't much we can do about that in libtock-c, that will have to be addressed in Tock
I'm guessing from https://github.com/tock/tock/issues/3938 that this is a kernel issue. This issue should be closed
Just to be clear. Are you saying that in userspace (libtock-c) the time in seconds is wrapping or the ticks return from the kernel are wrapping?
We verified the ticks being returned from the kernel were wrapping by printing out the value every second. So yes, this concerns the implementation in the kernel.
For the nrf52840 board, the
gettimeasticks
function timer wraps at ~511 seconds.Sampling
getimeasticks
every second yields the following:(@atar13 and @Samir-Rashid have found this to not be a bug, but expected behavior given the
nrf52x
rtc implementation -- further discussion to be posted by them as an issue in the main Tock repo).The inconvenience of
gettimeasticks
wrapping can be resolved through additional logic, but a timer wrapping every 511 seconds seems somewhat cumbersome.