2019-09-20 11:21 AM
Hi,
I want to configure the LIS3DH working with FIFO mode and OVERRUN interrupt on INT1. So, once the interrupt occur, MCU will read all data from FIFO. by reading the datasheet, I am a little bit confused for FIFO overrun behavior.
On the page 22 of datasheet, in FIFO mode, it says:
"An overrun interrupt can be enabled, I1_OVERRUN = '1' in the CTRL_REG3 (22h) register,
in order to be raised when the FIFO stops collecting data. When the overrun interrupt
occurs, the first data has been overwritten and the FIFO stops collecting data from the input
channels."
Does this mean that I lost the first data or I got first data wrong if I wait until overrun interrupt happened?
If yes, What is correct way to detect FIFO full and read FIFO data without losing data ?
Thanks,
Jeffrey
2019-09-26 02:06 AM
Hi Jeffrey, don't know if I catch the problem, maybe the LIS3DH app note at p.41 can help you. The shown example case considers 32 samples (but it's the same in case of a threshold) when the 33rd sample is inserted into FIFO and the 1st sample is overwritten, the new oldest sample set is made available in the output registers. Regards