-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
[2.0.x] Implement SDIO support for STM32F1 #12782
[2.0.x] Implement SDIO support for STM32F1 #12782
Conversation
dma_set_priority(SDIO_DMA_DEV, SDIO_DMA_CHANNEL, DMA_PRIORITY_VERY_HIGH); | ||
|
||
|
||
if (!SDIO_CmdGoIdleState()) { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the intention is to ignore the result of the first, doesn't the return false here defeat that? (sorry if I misunderstand what is supposed to happen here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMD0 does not wait for SD card's response.
False here means that SDIO hardware failed to send command, which should never be the case when SDIO is properly configured and clocked.
f18e5f4
to
739a652
Compare
This method is working for me to read data using SDIO on lerdge boards as well (in the STM32 HAL), so very useful. |
a32ec92
to
a59d3d4
Compare
OMG! Thank you so much for this PR @jmz52! This PR made my GTM32Pro board able to read the reprap discount smart display's SD card. There's only one more hurdle for my board (eeprom). Thank you, thank you, thank you, thank you! |
Description
Add support for SDIO interface for STM32F1.
Benefits
Marlin can used onboard SD cards on MKS Robin and various STM32F1 development boards.
Related Issues
#11641
Additional Information
Two defines are needed to enable SDIO interface
#define SDSUPPORT
#define SDIO_SUPPORT
To add SDIO support for other HALs three functions should be implemented in these HALs
bool SDIO_Init(void);
bool SDIO_ReadBlock(uint32_t block, uint8_t *dst);
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src);