Setting NRF_RTC1->TASKS_TRIGOVRFLW = 1; and the internal overflows variable in delay.c to 255 will cause millis to reset.
This is because the overflows variable is ANDed with 0xff so any overflow above 255 is reset to 0, meaning that after 255((2^24)(1/32768)) = 130560 seconds or 36.2 hours, the overflow variable is reset and millis drops to 0. This can be fixed by removing the & 0xff on overflows = (overflows + 1) & 0xff; in https://github.com/sandeepmistry/arduino-nRF5/blob/master/cores/nRF5/delay.c so that the overflows variable can increment past 255.
Setting NRF_RTC1->TASKS_TRIGOVRFLW = 1; and the internal
overflows
variable indelay.c
to 255 will cause millis to reset. This is because the overflows variable is ANDed with 0xff so any overflow above 255 is reset to 0, meaning that after 255((2^24)(1/32768)) = 130560 seconds or 36.2 hours, the overflow variable is reset and millis drops to 0. This can be fixed by removing the & 0xff onoverflows = (overflows + 1) & 0xff;
in https://github.com/sandeepmistry/arduino-nRF5/blob/master/cores/nRF5/delay.c so that theoverflows
variable can increment past 255.