AnsweredAssumed Answered

SD card CMD16 CRC fail

Question asked by Johanan on Apr 6, 2015
Latest reply on Apr 6, 2015 by Johanan
I am trying to use Cube generated code to SD card interface (1 bit SDIO) initialization starts ok but I always get CRC error at CMD16 at this code:

/* Set block size for card if it is not equal to current block size for card */
  sdio_cmdinitstructure.Argument         = 64;
  sdio_cmdinitstructure.CmdIndex         = SD_CMD_SET_BLOCKLEN;
  sdio_cmdinitstructure.Response         = SDIO_RESPONSE_SHORT;
  sdio_cmdinitstructure.WaitForInterrupt = SDIO_WAIT_NO;
  sdio_cmdinitstructure.CPSM             = SDIO_CPSM_ENABLE;
  SDIO_SendCommand(hsd->Instance, &sdio_cmdinitstructure);
  /* Check for error conditions */
  errorstate = SD_CmdResp1Error(hsd, SD_CMD_SET_BLOCKLEN);

Can't figure out why.