Content originally posted in LPCWare by schisanoa on Tue Jul 29 05:54:18 MST 2014
Example: periph_sdmmc
start debug, with break on:
"rc = f_open(&fileObj, "MESSAGE.TXT", FA_READ);"
(about line 229)
if I step over this line with lpcXpresso it return: FR_NOT_READY (hex code:0x03) and on the console I receive this message: "Card Acquire failed..."
if I step in when I am in the function Chip_SDMMC_Acquire(LPC_SDC_T *pSDC, SDMMC_CARD_T *pCardInfo), at this line:
"Ret = sendAppOpCond(pSDC, 0, true, &OCR, &CCS);"
I notice that "CCS" is a random number instead of a bool. So, stepping into this last function you will be in "sendAppOpCond(LPC_SDC_T *pSDC, uint16_t rca, bool hcs, uint32_t *pOcr, bool *pCCS)",
and here:
"Ret = executeCmd(pSDC, SD_ACMD41_SD_SEND_OP_COND, Argument, &Response);"
Response.Data[0] never match with "CMDRESP_R3_INIT_COMPLETE".
This is what I discovered until now, but may also be something else that I have not discovered yet.
Thank for your support.
PS, I think that you should have the same problem also with a different hardware