With more than about 290 packages in a collection of files we start getting FifoOverrun, i.e. the RTC interrupt is not run often enough. The only part that is in a critical section is the actual write (https://github.com/gauteh/sfy/blob/main/sfy-buoy/src/storage/mod.rs#L210). The immediate solution is to cap the package size to something like 250 packages (at 24MHz SPI for storage, but 150 package for 12MHz).
Could also move the Kalman-filter to the main loop and just collect samples in the interrupt, this would make it easier to write raw-data to the SD-card -- if we have time.
Maybe due to file being re-located when size increases.
With more than about 290 packages in a collection of files we start getting FifoOverrun, i.e. the RTC interrupt is not run often enough. The only part that is in a critical section is the actual write (https://github.com/gauteh/sfy/blob/main/sfy-buoy/src/storage/mod.rs#L210). The immediate solution is to cap the package size to something like 250 packages (at 24MHz SPI for storage, but 150 package for 12MHz).
Could also move the Kalman-filter to the main loop and just collect samples in the interrupt, this would make it easier to write raw-data to the SD-card -- if we have time.
Maybe due to file being re-located when size increases.