cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSO FIFO starvation: Gyro data missing at 6667Hz ODR with Sensor Hub active

altaris
Associate

Hi ST Community,

I am encountering a specific issue with the LSM6DSO configured in FIFO Mode with the Sensor Hub (Master I2C) active.

Hardware Setup:

  • IMU: LSM6DSO (SPI to STM32).

  • Slave Sensor: LIS2MDL Magnetometer connected to LSM6DSO via I2C (Sensor Hub mode).

  • I2C Bus: Standard 100 kHz. External pull-up resistors are populated on the PCB (in addition to the internal ones enabled via configuration).

Configuration:

  • ACC ODR: 6667 Hz (High Performance).

  • GYRO ODR: 6667 Hz (High Performance).

  • MASTER_CONFIG: 0x4C (Write Once + Pull-Up Enabled + Master On).

  • FIFO: Streaming Mode (storing Acc + Gyro + Slave0 Mag).

The Issue: When I enable both Acc and Gyro at 6667 Hz, the FIFO gets populated almost exclusively with Accelerometer and Magnetometer data. The Gyroscope data is missing or appears extremely rarely (effective rate ~6 Hz instead of 6667 Hz). The Accelerometer works perfectly (full 6.6k sample count).

However, if I lower the ODR to 3333 Hz, both Acc and Gyro work perfectly and are synchronized.

Hypothesis: I suspect a bandwidth bottleneck caused by the Sensor Hub I2C transaction time. At 6667 Hz, the sample period is ~150 µs. Reading the Magnetometer (6 bytes) over 100 kHz I2C takes approximately 500-600 µs. It seems the internal logic prioritizes the Sensor Hub I2C transaction, causing the Gyroscope (which has a slower turn-on/stabilization time) to be starved out of FIFO slots or fail to initialize properly due to the busy internal bus.

My Questions:

  1. Is there a known limitation where the Sensor Hub cannot operate concurrently with the Gyroscope at the maximum ODR (6667 Hz) due to I2C timing constraints?

  2. Is there a specific "interleaved" configuration or FIFO BDR setting that would allow the Gyro to insert data between Sensor Hub transactions at this speed?

I have tried delaying the FIFO BDR enabling (waiting 100ms for Gyro startup) and using Bypass-to-Stream transitions, but the issue persists at 6667 Hz.

Thank you for your support.

1 REPLY 1
Federica Bossi
ST Employee

Hi @altaris ,

FIFO batching of Sensor Hub external sensor is supported up to maximum ODR (6667 Hz) for both accelerometer and gyroscope. Here you can find an example code, specifically written to read LIS2MDL though LSM6DSO Sensor Hub interface with FIFO batching. STMems_Standard_C_drivers/lsm6dso_STdC/examples/lsm6dso_sensor_hub_lis2mdl.c at master · STMicroele…

Please check your code with the above reference.

If you still encounter issues, send us your code for fifo data parsing for review.

Thanks.

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.