2015-04-05 11:55 PM
Hello,
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.ThanksJohanan2015-04-06 02:46 AM