Tool/software: Linux
Hi Ti,
In a custom board(reference of AM571x), When i do normal read/write using dd command to SD/uSD card it is working fine on mmc1 and mmc3 controller. But when i use particular sequence of write/read with having vendor commands on mmc1 and mmc3 controllers, mmc1 SD/uSD is working fine, but mmc3 is failing at cmd17.
For my understand:
1. what might be the chances to get read fail for SD/uSD card for cmd17.
2. what are the difference between mmc1 and mmc3, to be to consider while doing read/write.
3. what might be the reason for getting Timeout as below?
Use commands are like:
Send cmd60, cmd24/cmd25, cmd17
Error:
CMD:17 arg=55aa flags = 3a0010
Need Software reset to CMD line
Error: Timeout waiting for SRD/SRC reset Complete
Error CMD-17
[ 688.239507] CMD:25 arg=55aa flags = 3a002a
[ 688.246542] RESP0:900
[ 688.248825] Inside mmc_write_data cnt-128 size=16384
[ 688.271114] Need Software reset to data line
[ 689.277024] Error: Timeout waiting for SRD/SRC reset Complete
[ 689.282795] ERROR: WR-Status Error
[ 689.286470] CMD:12 arg=0 flags = 1b0000
[ 689.292333] RESP0:c00
[ 690.296183] Timeout waiting for DATI | CMDI
[ 691.303039] Timeout waiting for DATI | CMDI
Snippet Code:
if ((mmc_stat & IE_CTO) != 0) {
printk(KERN_ERR "Need Software reset to CMD line\n" );
if(mmc_reset_cmd_data(mmc->base, SYSCTL_SRC)){
return 1;
}
while((HSMMC_READ(base, SYSCTL) & bit) !=0){
if(i++ > MAX_RETRY_MS){
printk(KERN_ERR "Error: Timeout waiting for SRD/SRC reset Complete\n" );
return 1;
}else {
mdelay(1);
}
}
if ((mmc_stat & (IE_DTO | IE_DCRC | IE_DEB)) != 0){
printk(KERN_ERR "Need Software reset to data line\n" );
if(mmc_reset_cmd_data(mmc->base, SYSCTL_SRD)){
//return 1;
}
}
Thanks and Regards,
Anil Kumar