Changes SDIO clock speed to 20MHz for Matek H743 Slim board #19177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses the reliability issues seen on the Matek H743 Slim board when using a Sandisk 4, 16, and 32GB Class-10 U1 A1 SD cards, as described in: #19155
The main approach here is to drop the max SDIO clock speed from 25MHz to 20MHz, which appears to have generally solved the problem, at least on the Matek H743 Slim (monitored over a few days of heavy SD card testing with sd_stress, sd_bench, and general parameter-based operations).
This may not be strictly necessary on all boards, and may be a function of things like temperature, the onboard oscillator components used on each physical board, or other factors. That said, a similar PR was introduced in Ardupilot which drops the clock speed to an even more conservative speed of 12.5MHz:
https://github.com/PX4/PX4-Autopilot/blob/master/boards/matek/h743-slim/nuttx-config/include/board.h#L292-L297
It would be good to have some feedback/review from those more familiar with the H7's clock tree and SDIO interface.