lsm6dsl FIFO DATA misaligned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-18 10:52 PM
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.
Solved! Go to Solution.
- Labels:
-
Accelerometers
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-20 7:36 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-20 7:36 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-20 1:57 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-20 11:43 PM
what is the TAG position? do you mean we need to check pattern(FIFO_STATUS3 & FIFO_STATUS4) before reading FIFO?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-21 1:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-21 1:41 AM
thanks for your reply, but we found that, if we don't read FIFO immediately when the water mark is set, the pattern will become not right, and the data became misaligned. for example the pattern is 2, but reading data is right like as [acc_x, acc_y, aa_z]. because our product needs to read FIFO with one second interval, so when the water mark is set, our application didn't read pattern and FIFO at once. then the issue happened.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-21 1:57 AM
my email is chun.dong@murata.com, you can directly contact me by email, because this issue has troubled us for a long time, thank you.
