cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dsl FIFO DATA misaligned.

cdong
Associate

hi,

     we use one LSM6DSL sensor to read 3 axis acc FIFO data each second, but after some times, the FIFO out data become misaligned. 

the sensor setting is below:

  • XL_ODR_26HZ
  • Gyro disabled.
  • FIFO ODR = 26Hz
  • FIFO threshold (water mark) = 128
  • No decimation
  • BDU Block Update enabled
  • FIFO Is in continuous modewe have a timer to trigger to read FIFO data by Zephyr I2C(frequency: 100000bits/s) each second, before data reading, we check the numbers of FIFO by checking FIFO_STATUS1 and FIFO_STATUS2 register, then we read a multiple of 3 axis sets each time, for example if the FIFO data number has 78, we will read all FIFO data one time, if the number is 76 or 77, we only read 75 data one time. it can make sure reading data is complete 3-axis data. firstly, the reading data is the right like as (X_ACC, Y_ACC, Z_ACC). but after some time (the time is not fixed) the data will become (Y_ACC, Z_ACC, X_ACC). we don't know how to fix this issue. please help us.
2 REPLIES 2
Federica Bossi
ST Employee

Hi @cdong ,

It happens when you miss some word fifo.
I suggest you always check the TAG position, after the tag there are 2 bytes per axis: X Y Z.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,
Jake

ST Support