2023-05-17 03:11 PM
Hi all,
I am trying to do a simple code for writing and reading files in a SDHC Card, i am trying to start with this example code:
https://community.st.com/s/article/how-to-create-a-file-system-on-a-sd-card-using-stm32bubeide
However, when the code reaches
It stucks for 30 seconds an then returns FR_DISK_ERR, if i repeat the same operation without the SD Card, it returns FR_NOT_READY
I have tried formatting the card, different cards, etc, same result.
I attached the .ioc file, just if there is any missing configuation or something wrong...
Thanks in advance
Solved! Go to Solution.
2023-05-18 01:01 AM
Hello @manuislet ,
If your project generated with STM32CubeMX, could you please check that the workaround provided in this discussion https://community.st.com/s/question/0D53W0000216T7oSAE/mxsdiosdinit-wrong-bus-wide-initialization is applied.
Please let me know if the issue is solved.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-05-17 03:31 PM - edited 2023-11-20 05:11 AM
Generally you should avoid F_MKFS or any WRITE functionality until you've validated the READ functionality of the DISKIO layer of FatFS
All cards these days come formatted, and have structures properly aligned wrt the erase block size of the underlying NAND Flash array. Reformatting tends to ignore this, and is highly detrimental to performance and wear.
F4 write failures.. I'd probably make sure HW Flow Control is OFF
dRonin OpenLager
2023-05-18 01:01 AM
Hello @manuislet ,
If your project generated with STM32CubeMX, could you please check that the workaround provided in this discussion https://community.st.com/s/question/0D53W0000216T7oSAE/mxsdiosdinit-wrong-bus-wide-initialization is applied.
Please let me know if the issue is solved.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-05-19 01:27 AM
Thanks @Community member and @KDJEM.1, confirmed that changing SDIO mode from 4B to 1B, i can write and read any SDcard i have. Although speed with 1B is more than enough for my application, is there any tested/verified workaround for this bus?