2025-06-23 5:51 AM - edited 2025-06-23 6:02 AM
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:
SD Initialization Fails:
HAL_SD_Init() consistently returns HAL_ERROR (Status: 1).
Card Not Ready:
The card state remains 0, indicating that it is not ready or not properly initialized.
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