4 bit SDIO / SD Card / SDMMC issue on NUCLEO-H723ZG STM32H723ZG STM32H7
Hi All,
I have been breaking my head the past few weeks trying to connect an SD card to the STM32H723ZG with no success.
My setup is simple:
- Evaluation board is NUCLEO-H723ZG.
- SD card breakout board wired using 4 bit SDIO.
- 47K pull up resistors
- using CubeMX to generate the project. FW_H7 1.8.0
- connected the wires to CN8
- Removed SB14 SB 15 brideg resistors to the CN11
- Generate code with cubemx - configure it with SDMMC1, 4 bit SDIO
HW configure is seen in this image:
using 1 wire SDIO with this configuration everything works well.
using 4 wire SDIO we I get an CRC fail inside the HAL_SD_ReadBlocks function .
basically before the main loop and after the peripheral are configure I am trying to run this code:
retVal = HAL_SD_Init(&hsd1);
if(retVal == HAL_OK) printf("HAL_SD_Init OK\r\n");
retVal = HAL_SD_ReadBlocks(&hsd1, buff, 0, 1, HAL_MAX_DELAY);
if(retVal == HAL_OK) printf("HAL_SD_ReadBlocks OK\r\n");
but the read function fails on a CRC internally.
Also tried to play with SDMMC clock from clock configuration screen
Also tried to play with the clock div.
Also forced clock to at and run in 400Kbit/s like seen in the initCard fucntion.
Any ideas what to do now?
thanks!
Dan
