-
Notifications
You must be signed in to change notification settings - Fork 19.8k
modules: update ChibiOS to fix SD card watchdogs/stuck threads #31620
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
base: master
Are you sure you want to change the base?
Conversation
|
For posterity I used these. The wiggling (and insertion/removal) mangles the flat flex cable's contacts pretty quickly, so it turned out to be a good thing they came in a pack of four! |
For posterity I paste an iamge of what I got then following your link: I mean, yeah, those do often travel in packs... I assume you were using their tails? Did you tape the flex or use rip-ties? Enquiring minds must know. |
48b19ef to
8ed6f55
Compare
|
This is so great to see, thanks @tpwrules! |
|
@tpwrules thanks for this! I'm happy to bring this in for 4.7 before it gets into upstream ChibiOS |
Incorporates ArduPilot ChibiOS pulls ArduPilot#99 , ArduPilot#100, and ArduPilot#101 to fix issues in the SD card drivers which can cause the flight controller to hang (and subsequently watchdog) or the logging thread to fall asleep forever and be unable to recover. Both results can happen during flight. The former result happens on F4 and F7 only, the latter happens on H7 too. The issues are mostly triggered by an SD card that is rapidly connected and disconnected, such as vibrating in its socket, though random card communication failures could trigger them too. They have existed for a very long time. Testing was performed on Cube Black (F4), Pixhawk 4 Mini (F7), and Cube Orange (H7). The issues were reproduced using an SD card extender, then deliberately unlocking and carefully wiggling the flat flex cable. After these patches, this can be done apparently indefinitely and the logging thread always comes back and logging restarts after the SD card is securely attached again. Note that some boards are evidently vulnerable to this wiggling shorting out the SD power rail and resetting the CPU too. Software can't fix that, so vehicles with poor SD card connections need to be fixed properly!
8ed6f55 to
5c88122
Compare
|
ChibiOS PRs merged, this one is ready now. |


Incorporates ArduPilot/ChibiOS#99 , ArduPilot/ChibiOS#100 , and ArduPilot/ChibiOS#101 to fix issues in the SD card drivers which can cause the flight controller to hang (and subsequently watchdog) or the logging thread to fall asleep forever and be unable to recover.
Both results can happen during flight. The former result happens on F4 and F7 only, the latter happens on H7 too. The issues are mostly triggered by an SD card that is rapidly connected and disconnected, such as vibrating in its socket, though random card communication failures could trigger them too. They have existed for a very long time.
Testing was performed on Cube Black (F4), Pixhawk 4 Mini (F7), and Cube Orange (H7). The issues were reproduced using an SD card extender, then deliberately unlocking and carefully wiggling the flat flex cable. After these patches, this can be done apparently indefinitely and the logging thread always comes back and logging restarts after the SD card is securely attached again.
Note that some boards are evidently vulnerable to this wiggling shorting out the SD power rail and resetting the CPU too. Software can't fix that, so vehicles with poor SD card connections need to be fixed properly!
I have not done any sort of "soak" testing, just checked that logging seems to work for a few minutes still. This probably needs a bit of time to bake in master.
Closes #31108 . This PR is ready once the ChibiOS PRs have been merged and the committed hash fixed.