Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMU: Fixed ICM42688 "stuck" gyro issue #25332

Merged
merged 2 commits into from
Oct 22, 2023

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Oct 21, 2023

This fixes issue #25025
the ICM42688 has an "AFSR" feature (enabled by default) where it switches between a low-noise mode at angular rates below 100 deg/sec and a higher noise mode above that level. When it switches it causes the gyro to become "stuck" for between 1ms and 2ms, leading to a significant gyro bias that can under some circumstances lead to a crash of the vehicle if it is not able to switch to another IMU.
This PR does 2 things:

  • it disables this AFSR feature on the ICM42688
  • it enables optional FIFO rate logging to make the fix apparent in a log using the GYR log message. This FIFO rate logging is disabled by default

these undocumented bits in register 0x4d control the "adaptive full
scale range" mode of the ICM42688. The feature is enabled by default
but has a bug where it gives "stuck" gyro values for short periods
(between 1ms and 2ms):, leading to a significant gyro bias at longer
time scales, enough to in some cases cause a vehicle to crash if it is
unable to switch to an alternative IMU

this fixes ArduPilot#25025
…river

this is useful for tracking down and confirming the stuck gyro issue
on the ICM42688
@andyp1per
Copy link
Collaborator

Whew!

@tridge tridge merged commit b6c9ac2 into ArduPilot:master Oct 22, 2023
86 checks passed
@SteveCEvans
Copy link

Thanks for figuring this out guys. PR now raised for Betaflight. betaflight/betaflight#13132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 4.4.3-beta1
Development

Successfully merging this pull request may close these issues.

3 participants