cancel
Showing results for 
Search instead for 
Did you mean: 

Question about LIS3DH FIFO operation

jeffz
Associate II

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

1 REPLY 1
Eleon BORLINI
ST Employee

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

0690X000009jHqeQAE.png