cancel
Showing results for 
Search instead for 
Did you mean: 

problem with initialisation SDMMC

EEuge
Senior
/* Send ACMD41 SD_APP_OP_COND with Argument 0x80100000 */
 
while(validvoltage == 0)
 
{
 
  if(count++ == SDMMC_MAX_VOLT_TRIAL)
 
  {
 
    return HAL_SD_ERROR_INVALID_VOLTRANGE;
 
  }
 
 
 
  /* SEND CMD55 APP_CMD with RCA as 0 */
 
  errorstate = SDMMC_CmdAppCommand(hsd->Instance, 0);
 
  if(errorstate != HAL_SD_ERROR_NONE)
 
  {
 
    return HAL_SD_ERROR_UNSUPPORTED_FEATURE;
 
  }
 
 
 
  /* Send CMD41 */
 
  errorstate = SDMMC_CmdAppOperCommand(hsd->Instance, SDMMC_STD_CAPACITY);
 
  if(errorstate != HAL_SD_ERROR_NONE)
 
  {
 
    return HAL_SD_ERROR_UNSUPPORTED_FEATURE;
 
  }
 
 
 
  /* Get command response */
 
  response = SDMMC_GetResponse(hsd->Instance, SDMMC_RESP1);
 
 
 
  /* Get operating voltage*/
 
  validvoltage = (((response >> 31) == 1) ? 1 : 0);
 
}
 

 I tested with a debugger that where fail the program. Inside of the SD_PowerON function exist a while loop. When the cards don't recognize this while loop run infinitelly and never go out from there.

2 REPLIES 2
Romain DIELEMAN
ST Employee

Hi,

This does not seem related to TouchGFX. You should add the appropriate topic tag to have more people see your post.

Could you provide more information on your setup ? Where are you doing those settings ? Are you starting from scratch or from an application template ?

/Romain

Hello.

I didn't add resistors on SD lines. I was hoping there would be enough internal pullup resistors.