I have been trying to figure out this problem for a while now. Im just trying to write a simple message to my sd card but when it calls the ” static void MX_SDMMC1_SD_Init(void);” function it gets stuck in a loop function in the sdmmc.c file that looks like this. This code is generated by cubeMX by the way.
static uint32_t SDMMC_GetCmdError(SDMMC_TypeDef *SDMMCx)
/* 8 is the number of required instructions cycles for the below loop statement.
The SDMMC_CMDTIMEOUT is expressed in ms */
uint32_t count = SDMMC_CMDTIMEOUT * (SystemCoreClock / 8U /1000U);
if (count-- == 0U)
It seems that when the SDMMC tries to send a CSM flag to the sd card its not getting a response back? If anyone has had a similar issue or knows more about these drivers than I do please help!