After having run some code for 6h and 9h respectively, I have more information but nothing conclusive yet.
I changed the time output to be divided by OSTICKS_PER_SEC to get seconds which are easier to read
So, 6h of sending every 5 minutes without sleep (only 150x 2s delay) and no tinkering with the timers:
Debug looks like this from beginning to end:
go to sleep … … woke up …sending…
22345: Queue packet
22345: engineUpdate, tx at 21738; now is: 22345
22345: EV_TXSTART
22345: tx done
22351: EV_TXCOMPLETE (includes waiting for RX windows)
sent
go to sleep … … woke up …sending…
22651: Queue packet
22651: engineUpdate, tx at 22085; now is: 22651
22651: EV_TXSTART
22651: tx done
22656: EV_TXCOMPLETE (includes waiting for RX windows)
sent
Then changed to sleep for 2 seconds instead of the delay. First 6h no difference, no inexpected delays:
go to sleep … … woke up …sending…
33976: Queue packet
33976: engineUpdate, tx at 33369; now is: 33976
33976: EV_TXSTART
33976: tx done
33982: EV_TXCOMPLETE (includes waiting for RX windows)
sent
go to sleep … … woke up …sending…
34282: Queue packet
34282: engineUpdate, tx at 33716; now is: 34282
34282: EV_TXSTART
34282: tx done
34288: EV_TXCOMPLETE (includes waiting for RX windows)
sent
Then, after 9.52 hours, this happens:
go to sleep … … woke up …sending…
34282: Queue packet
34282: engineUpdate, tx at 33716; now is: 34282
34282: EV_TXSTART
34282: tx done
34288: EV_TXCOMPLETE (includes waiting for RX windows)
sent
go to sleep … … woke up …sending…
-34131: Queue packet
4294933165: engineUpdate, tx at 33981; now is: 4294933165
-34131: EV_TXSTART
4294933165: tx done
-34126: EV_TXCOMPLETE (includes waiting for RX windows)
sent
go to sleep … … woke up …sending…
-33826: Queue packet
4294933470: engineUpdate, tx at 34328; now is: 4294933470
-33826: EV_TXSTART
4294933470: tx done
-33819: EV_TXCOMPLETE (includes waiting for RX windows)
sent
go to sleep … … woke up …sending…
-33519: Queue packet
4294933777: engineUpdate, tx at 4294933170; now is: 4294933777
-33519: EV_TXSTART
4294933777: tx done
-33513: EV_TXCOMPLETE (includes waiting for RX windows)
sent
So, rollover happend, first for now, then for txbeg. No problem so far, as still no send delays.
Next test will be sending not every 5 minutes but every 1 hour. Maybe this causes the problem to show up.