SDMMC1 get stuck in SD_SendSDStatus
- November 6, 2023
- 1 reply
- 4320 views
Hi,
I am implementing micro-sd card with STM32H573RI using SDMMC1 interface. I am using HSE clock with input frequency 25MHz and the system clock is running at 250 MHz. SDMMC1 clock mux is sourced by PLL1Q(25MHz).
All the SD card initial commands in the command line works fine until "ACMD13" sent followed by CMD55. Once the ACMD13 sent it gets me stuck in "SD_SendSDStatus" function in the place "if (__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXFIFOHF))" that is the place where we get the status data.
When I look into the SDMMC_STAR register RXFIFOE shows it as empty and DPSMACT is set to 1. Command path state machine works fine, but nothing is received in the Data path state machine FIFO.
The pins used for SDMMC1 are as follows
/**SDMMC1 GPIO Configuration
PC12 ------> SDMMC1_CK
PC11 ------> SDMMC1_D3
PC10 ------> SDMMC1_D2
PC9 ------> SDMMC1_D1
PB2 ------> SDMMC1_CMD
PB13 ------> SDMMC1_D0
*/
Please help me to troubleshoot this issue.
