cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Interfacing SD Card with STM32H753ZIT6 Development Module

Ematic
Associate II

Hi, 

I'm facing issues while trying to interface a 32GB SD card with the STM32H753ZIT6 development board using SDMMC1 and FatFS. Below are the key problems observed:

  1. SD Initialization Fails:
    HAL_SD_Init() consistently returns HAL_ERROR (Status: 1).

  2. Card Not Ready:
    The card state remains 0, indicating that it is not ready or not properly initialized.

  3. Incorrect Card Capacity Reported:
    Despite using a 32GB SD card, the detected capacity is only about 1.8GB (1806848 KB).

This suggests the card isn't being properly initialized or detected, and capacity detection is failing. Looking for help identifying the root cause—whether it's clock config, pin setup, timing issues, or something else.

I have attached the code and output file.

Pin connection between SD card to STM32:

-------------------------------------------------------------

DAT0    ->   PC8

DAT1    ->   PC9

DAT2    ->   PC10

DAT2    ->   PC11

CLK      ->   PC12

CMD     ->   PD2

VCC     ->   3.3V

GND     ->  GND

 

2 REPLIES 2
KDJEM.1
ST Employee

Hello @Ematic;

 

Did you get the same issue when working in 1 bit bus wide mode?

Could you try to use the latest STM32CubeMX version to generate your code.

I recommend you to look at How to create a file system on a SD card using STM32CubeIDE - STMicroelectronics Community

 

Thank you.

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.