SDIO-SD卡的例程里为什么发完CMD0是通过读取SDIO_STA寄存器判断CMD是否发送成功,而不是读取R0。请大神回答我!谢谢!
SDIO_CmdInitStructure.SDIO_Argument = 0x0;
SDIO_CmdInitStructure.SDIO_CmdIndex = SD_CMD_GO_IDLE_STATE;
SDIO_CmdInitStructure.SDIO_Response = SDIO_Response_No;
SDIO_CmdInitStructure.SDIO_Wait = SDIO_Wait_No;
SDIO_CmdInitStructure.SDIO_CPSM = SDIO_CPSM_Enable;
SDIO_SendCommand(&SDIO_CmdInitStructure);
errorstatus = CmdError();
if (errorstatus != SD_OK)
{
/* CMD Response TimeOut (wait for CMDSENT flag) */
return(errorstatus);
}
|
|