Skip to main content
Visitor II
February 19, 2025
Solved

lsm6dsl FIFO DATA misaligned.

  • February 19, 2025
  • 2 replies
  • 956 views

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.
    This topic has been closed for replies.
    Best answer by Federica Bossi

    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.

    2 replies

    Technical Moderator
    February 20, 2025

    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.

    cdongAuthor
    Visitor II
    February 21, 2025

    what is the TAG position? do you mean we need to check pattern(FIFO_STATUS3 & FIFO_STATUS4) before reading FIFO?

    Technical Moderator
    February 21, 2025

    Hi @cdong ,

    For this product it is called FIFO_PATTERN, you can refer to par 8.4 of AN5040

    ST Employee
    February 20, 2025

    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