icyphy / lf-buckler

Programming an nRF embedded board with a Berkeley Buckler daughter card using Lingua Franca.
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Programs stop running after 70 minutes #3

Closed edwardalee closed 2 years ago

edwardalee commented 2 years ago

Programs stop running after 70 minutes because, I presume, the timer on the board being used to obtain physical time is a 32-bit unsigned integer, and after about 70 minutes, it overflows.

arengarajan99 commented 2 years ago

Since this is also an issue with Arduino as well, I'll take this up as a separate task.

edwardalee commented 2 years ago

I have fixed this for the lf-buckler. There, time stamps are 64 bits, so the only thing that was needed was to detect when the physical timer measuring real time, which has only 32 bits, overflowed. My implementation assumes that the program accesses physical time at least once every 35.5 minutes (it would be better to enforce that).

edwardalee commented 2 years ago

Closed via commit https://github.com/icyphy/lf-buckler/commit/c808312a26aa4a8f75f0cdb45bd2a563f53a9678