cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to mount SD card with SDMMC 4-bit bus, but with 1 bit but it works fine

Bhavin-D
Associate

Board = NUCLEO-F756ZG

SD Card Spec = SDHC Class 10

Board to SD card connection wire length = ~10cm

SDMMCCLK clock divide factor = 8 (So SDMMC_CK = 3 MHz)

Accept CLK line, on all lines 22K pull-up resisters are connected.

I am trying to mount and read/write into an SD card with an SDMMC 4-bit bus without DMA. But the FATFS f_mount() function fails with a FR_NOT_READY error. Where the same hardware with the SDMMC 1-bit bus software, mounts an SD card and is able to read/write in an SD card.

Can you please help me to work with 4-bit SDMMC?

What could be the possible reason specific to 4-bit?

Can you please share a working example?

2 REPLIES 2
KDJEM.1
ST Employee

Hello @Community member​ and welcome to Community 🙂 ;

I recommend you How do I Create a File System on a SD card using STM32CubeIDE? article. This FAQ can help you to create a file system on a SD card with 4-bit bus using STM32F746G-DISCO

I assume that you get FR_NOT_READY error because one of the following possibilities is suspected:

  • No medium in the drive.
  • Wrong hardware configuration.
  • The storage device has broken.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

  

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.

Amel NASRI
ST Employee

Hi @Community member​ ,

Is your project generated with STM32CubeMX?

If yes, 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 the result (in both cases: problem resolved or not).

-Amel

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.