Hi,
When we build and run "AM1808eXp MMCSD Test" BSL example code with SD card provided with the kit, the code hangs after printing the following:
--- identify card ---
On debugging with breakpoints, we found out that the code gets stuck inside sendCmd() function in following while loop.
if (check_status)
{
while (1)
{
stat_reg = mmcsd->MMCST0;
stat1_reg = mmcsd->MMCST1;
if (CHKBIT(stat_reg, RSPDNE))
{
rtn = ERR_NO_ERROR;
break;
}
else if (CHKBIT(stat_reg, TOUTRS))
{
rtn = ERR_MMCSD_TIMEOUT;
break;
}
}
}
This sendCmd() is in-turn invoked by MMCSD_identifyCard() function found inside the same file evmam1808_mmcsd.c. On close observation we found that code hangs after calling :-
sendCmd(mmcsd, MMCSD_CMD_APP, 0, 1);
That implies two things :-
1. A response time-out event has not occurred
2. No receiving response is done
Strangely, the debugger shows the value of MMCST0 as 0x00 and MMCST1 as 0x30 for this state. Furthermore, when we remove the card after first sendCmd() inside MMCSD_identifyCard() (using breakpoint and run), we get time-out flag set in MMCST0.
Is it required to have initialization clock and operational (read/write) clock to be different, say 400kHz and 20MHz respectively?
Regards,
Rohit
|