2025-12-04 4:58 AM - last edited on 2025-12-04 5:26 AM by Andrew Neil
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:
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?
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.