cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2HH12 : How to efficiently record all accelerometer datas ?

Alexandre T
Associate II
Posted on October 03, 2017 at 13:32

Hello,

I'm using the LIS2HH12 accelerometer for my project.

I want to record all the x,y,z datas during 2 seconds without any loss at a high frequency.

What is the best way to do that (Which FIFO mode...) ?

#lis2hh12 #accelerometer #fifo
2 REPLIES 2
Miroslav BATEK
ST Employee
Posted on October 03, 2017 at 14:13

It is not necessary to use the FIFO. You can enable Data Ready signal on an interrupt pin and read data each time the interrupt is triggered.

In this case your system must be able to read the data faster than the selected ODR.

If you want to use the FIFO you can, the recommended mode is Stream mode, please see chapter 5.3.3 in the datasheet.

In this mode the FIFO will behave as a buffer, you can also enable watermark interrupt to generate signal when FIFO reach a certain level.

Posted on October 03, 2017 at 14:27

Yes, I read the entire datasheet but I am afraid of loosing some datas using this mode as my program is doing other things.

Thank you for your answer !