cancel
Showing results for 
Search instead for 
Did you mean: 

How does the FIFO works for LSM6DSO

gabriel.arnautu
Associate II

Hi,

I was wandering how the FIFO works in terms of reading and writing data at the same time. While I am reading the FIFO, what happens with the new data that is generated from the accelerometer? Am I losing this data, or is it stored in the FIFO again?

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @gabriel.arnautu​ , from p.97 on the AN5192 descrifes the FIFO working modes and their features. To answer your question, if you select "FIFO mode", the FIFO buffer continues filling until it becomes full. Then it stops collecting data and the FIFO content remains unchanged until a different mode is selected. If you select a threshold and enabled the STOP_ON_WTM bit, the FIFO behavior will be the same up to the threshold. Otherwise, if you select "continuous mode", the FIFO continues filling. When the buffer is full, the FIFO index restarts from the beginning, and older data are replaced by the new data. The oldest values continue to be overwritten until a read operation frees FIFO slots. The host processor reading speed is important in order to free slots faster than new data is made available. To stop this configuration, Bypass mode must be selected. You can find in the same app note other details on mixed FIFO working modes.

Regards