cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSL: Reading the FIFO correctly?

SWood.5
Associate II

We are trying to use the FIFO on the LSM6DSL to get accelerometer data, gyroscope data and time stamps at 833Hz. Though we have followed the directions in the Applications Note, we are still not getting correct data from the FIFO. The data appears scrambled. I have been checking the pattern registers before retrieving the FIFO data, and they return 0, which I believe means the next sample should be Gyro-X. Based off the Applications note (and since both the gyroscope and accelerometer are set to 833Hz), I expect the next samples to be Gyro-Y, Gyro-Z, Accel-X, Accel-Y, Accel-Z, Timestamp. Is that the correct order? If so, do you have any ideas about why the data might be incorrect? I included a snapshot of some of the data was have been getting. The IMU number is just to keep track of which IMU we are sampling, since we have an array of multiple IMUs. Thank you!

0690X000008AovUQAS.png

1 REPLY 1
Eleon BORLINI
ST Employee

hi, could you share the FIFO configuration values (registers from FIFO_CTRL1 to FIFO_CTRL5)? To understand if you are working in continuous or FIFO mode (p 82 of the app note), if you set some watermark or samples thresholds. Did you try to acquire the only  GyroX, GyroY, GyroZ, AccX, AccY, AccZ to check your synchronization? As regard the timestamp feature, did you follow the rules described in p 93? Regards