cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_SD_ERROR_DATA_TIMEOUT on stm32H743ZI2 when I try to use SD card with SDMMC1+ FATFS

M.CHN
Associate III

Hello everyone,

I am working on a project in which I need to store data on extern memory with a nucleo-H743ZI2 board. I choose to use an SD card (SDHC Class 10, with 4Gb) because it is smaller than a usb key.

I use SDMMC1 on PLL1Q at 48MHz and the clock divider parameter is set to 96 and all the others parameters are the default parameters in CUBEMX. I try to communicate in 1 bit mode before using 4 bit mode :

  hsd1.Instance = SDMMC1;
  hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
  hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
  hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B;
  hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
  hsd1.Init.ClockDiv = 96;
  hsd1.Init.TranceiverPresent =SDMMC_TRANSCEIVER_NOT_PRESENT  ;

However when I try to mount the card with f_mount(), I have the error FR_NOT_READY. When I use step by step verification, I have the HAL_SD_ERROR_DATA_TIMEOUT error in "get status data" part in SD_SendSDstatus function.

I don't understand how to solve this error.

I saw on this posts that it could be a matter of memory and buffer used by SDMMC1 but I don't know where I can change it and how to change it.(https://community.st.com/s/question/0D50X00009XkWtOSAV/stm32h7-sdmmc-not-working)

Thank you for your answers.

Best regards

M.C

0 REPLIES 0