Hello everyone,
I'm using a Nano 33 BLE Sense in the flight computer of an amateur sounding rocket to control parachute deployment and record flight data. Deploying the parachute requires high current, which may affect the power supply to the Arduino board since they are not completely separated and are both powered by the same 11V lithium-ion battery.
The recorded flight data includes time measured by the millis() function, along with acceleration, gyroscope, pressure, etc. These data points are written in CSV file format on an SD card, with the measured values ordered by time in each row.
After launching and retrieving the flight data, I discovered that the recorded time for some rows did not change for about 12 seconds (estimated by a loop frequency of 20ms and 600 rows) during the parachute deployment. I wondered how the timer had stopped while other functions, such as SD writing and sensor readings, continued to work normally (the recorded values were normal).
According to what I've found online, the millis() function uses timer0 in the peripherals of the nRF52840 and counts milliseconds by interrupting on timer0 overflow. Therefore, I suppose that a power failure interrupt, which has higher priority than the timer interrupt, may have blocked it and stopped the millisecond counting, while the CPU of the nRF52840 continued to work even with low voltage.
I'm not sure about the power failure interrupt and the details of timer0, but as far as I know, interrupts that occur simultaneously are processed in order, and none are ignored. Also, according to the nRF52840 datasheet, the power failure interrupt is triggered again when the input voltage had exceeded the hysteresis voltage and then fell down under power fail voltage. So, how could the power failure interrupt block the timer0 overflow interrupt for 12 seconds? Are there any other factors that could have stopped the timer?