2025-05-03 4:00 AM
Example SD Card file write example using Azure RTOS FileX with SDIO is not working for STM32F767ZI Nucleo board. Please let me know how to fix it. I used the Fx_uSD_File_Edit example is used. It is failing in getting the SCR register value on the SD Card. Anyone have any idea on this issue? Am I missing anything? Even the same thing is happening with the project created by myself for STM32F767ZI Nucleo board. What can be the solution?
Solved! Go to Solution.
2025-05-03 4:51 AM
Probably hardware problem; how you connect sd-card ? (pic ?)
wires? lenght?
pin mode?
1 or 4-bit mode?
2025-05-03 4:51 AM
Probably hardware problem; how you connect sd-card ? (pic ?)
wires? lenght?
pin mode?
1 or 4-bit mode?
2025-05-03 5:43 AM
Wires connected are 8 and the length of the wires may be around 30 cm. I had selected the SDMMC1 peripheral for SD card interface. Using 4-bit SD mode.
Pin Mode: Alternate Function Push Pull
Pin 2 SDMMC_D0 PC8
Pin 4 SDMMC_D1 PC9
Pin 6 SDMMC_D2 PC10
Pin 8 SDMMC_D3 PC11
Pin 10 SDMMC_CK PC12
Pin 12 SDMMC_CMD PD2
Pin 11 GND
Pin 7 VCC (+3.3V)
2025-05-03 7:12 AM - edited 2025-05-03 7:31 AM
Ok, just think: the sd-card works at full speed with 25MHz data clock/rate , so short connection is needed.
From my tests i can tell: connected to the nucleo pin header with 70mm wires , no connection to card.
Same adapter with 20mm wires working.
And all pins set on medium or medium/high speed, pullups ON .
And at first 1-bit mode (is less critical than 4-bit mode).
And dont write or mkfs at first , only read (existing file on card) ! ..until this working fine.
2025-05-04 3:46 AM
Thanks for the suggestions. Will try the changes what you suggested. But how can I connect the SD card module to the Nucleo pin header? Do I need to solder the wires from the Nucleo board to the SD card?
I have received the response for command, but the data was not received when I tried first time. This was what I noticed. Let me try what you suggested now and see. Will update on the same.
2025-05-04 6:28 AM - edited 2025-05-04 6:33 AM
The command... starting time is always at about 400kHz , then card transfer data at DX pins at the speed, that's possible from clock settings and it's capability.
So command should always work, but at data transfer the good or bad connection shows up.
On the test/ nucleo board I didn't solder, just put pin headers and then short soldered wires to the card holder. So easy to remove and change something.
And all signal or data lines have to be short and same length.
Clock for sdmmc I set to 100MHz and divide 1 . Then 50M clock for the card, that's the maximum, all cards can do here.
And always care for antistatic handling, card's and even more the sdmmc pin's are not forgiving even one time touching with some charge...end of working SD card connection.
2025-05-05 7:50 AM
Thanks for quick response with details. Will take all your feedback and test the project. Will update you on the same.
Thanks!