LSM6DSOX/ISM330DHCX: real sample rate lower than expected in FIFO mode
Hi,
I am using the LSM6DSOX and ISM330DHCX in FIFO mode at 52 Hz or 208 Hz. For 52 Hz the real frequency turns out to be about 48.57 Hz, and proportionally so for 208 Hz. I am confirming this through the number of samples collected between GPS fixes and when comparing a signal against another type of sensor. The observed frequency is stable at this rate.
Could this be real or is there something wrong in my application? The FIFO is checked using an RTC and is never allowed to run full (the overflow, full, overflow_latched) bits are checked. I drain (pop) the number of samples available at the RTC interrupt, but do not reset it. Does operating the FIFO or draining it halt the FIFO or reduce the number of samples?
I observe the same both with the LSM6DSOX and the ISM330DHCX.
IMU configuration: github.com/gauteh/sfy/blob/main/sfy-buoy/src/waves/mod.rs#L231
FIFO drain function: github.com/gauteh/sfy/blob/main/sfy-buoy/src/waves/mod.rs#L395
Best regards, Gaute
