I tried the new Snapdragon Flight controller and noticed that the IMU9250 publish rate is limited to 250Hz in df_mpu9250_wrapper. I wonder if anyone knows the reason for this?
Thank you very much.
This value controls the Output Data Rate (ODR) at which all of the sensors will be sampled and written into the FIFO. It does not control the bandwidth of individual sensors, however. So, for example, the accel can be configured to operate at 1 KHz while the gyro is configured to operate at 8 KHz, both of which will fill the FIFO at some lesser rate.
Controlling the ODR is particularly important when the MPU9250 magnetometer is used. The mag is read over an internal I2C bus which is then read into the MPU9250 FIFO. If this process occurs too frequently due to an Output Data Rate that is too high, the mag will be bombarded with I2C read traffic and will not update its own internal representation of the latest mag measurement. This causes it to appear stuck with a single unchanging value.
Thanks for your reply. My understanding is that the MPU9250 driver reads the FIFO buffer at 1KHz, i.e. around 8 samples a time. Seems this happens regardless of whether mag is enabled or not. My question is in df_mpu9250_wrapper.cpp line 609 to 615, _publish_count is used to down scale the IMU sensor data publish rate to 250Hz. Is there any specific reason for this downscaling?