Skip to content

Conversation

@bkleiner
Copy link
Collaborator

@bkleiner bkleiner commented Dec 7, 2024

this PR modifies the H7 sdio init sequence in the following ways:

  1. modifies the clock edge to falling. all the stm32 examples i could find use it this way and it seemed to work more reliable with the cards i own
  2. disable the sdmmc power saving feature. this drastically reduces time it takes for the sdcard to respond to reads
  3. reduce the speed our cards operate at. previously this was maxed, dialing this back a notch is still plenty fast, but should increase compatibility.
  4. modify the SDMMC RCC reset sequence. as i understand the clock is supposed to be enabled when the reset is being triggered.

additionally, code was added to propagate read-timeouts back to their respective callback, this should prevent it from blocking boot in case a incompatible sdcard is encountered.

@bkleiner bkleiner force-pushed the bkleiner/fix-h7-sdcard branch from 83c7a9e to a4eba5e Compare December 7, 2024 19:18
@b14ckyy
Copy link
Collaborator

b14ckyy commented Dec 7, 2024

Looks good so far. Init on H743-SLIM within 5s and normal operation.

@bkleiner bkleiner marked this pull request as ready for review December 8, 2024 13:53
@mmosca mmosca merged commit abc286d into iNavFlight:master Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants