初级会员

- 积分
- 52
- 金钱
- 52
- 注册时间
- 2013-6-7
- 在线时间
- 23 小时
|

楼主 |
发表于 2016-12-17 11:37:08
|
显示全部楼层
本帖最后由 yanzhongsan 于 2016-12-17 16:45 编辑
刚发的不见了,不知道是触犯了规则被管理员删了还是怎么回事
do {
sdio_cmdinitstructure.Argument = 0;
sdio_cmdinitstructure.CmdIndex = SD_CMD_SEND_OP_COND;
sdio_cmdinitstructure.Response = SDIO_RESPONSE_SHORT;
sdio_cmdinitstructure.WaitForInterrupt = SDIO_WAIT_NO;
sdio_cmdinitstructure.CPSM = SDIO_CPSM_ENABLE;
SDIO_SendCommand(hsd->Instance, &sdio_cmdinitstructure);
errorstate = SD_CmdResp3Error(hsd);
count++;
if (SD_OK == errorstate) {
response = SDIO_GetResponse(SDIO_RESP1);
}
HAL_Delay(1);
} while ((count < SD_MAX_VOLT_TRIAL) && (0 == (response & 0x80000000)));
程序会陷在这里执行直到cout超出最大值,而response 的值始终为0x00ff8080;参考网上的一份代码将sdio_cmdinitstructure.Argument改为0x40FF8080,也是一样的效果,改成0xC0FF8080也一样,哪位高手能指点下为什么吗?是哪里有问题,从数据手册看应该返回0xC0FF8080才对,最高位为0表示未完成power up |
|