SDCard with MCI from LPCOpen not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDCard with MCI from LPCOpen not working

776 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Sun May 11 10:18:50 MST 2014
Hello, I spent the last day trying to get working the SD Card interface.

I'm using LPCOpen 2.10 for LPC4088, and I tried 4 different SD card but the system is not working. I started from my own code, and when I saw it was not working I switched to 2 LPCOpen Sample:

-app_sdmmc_meas
-periph_sdmmc

and both the example don't work with the Embedded artists LPC4088 Devoleper's kit (http://www.embeddedartists.com/products/kits/lpc4088_kit.php)

Could someone try the example with the same board(if available) and check if it is only a my problem or there is a bug in the LPCOpen code?

Thanks

Alessio
Labels (1)
0 Kudos
Reply
5 Replies

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Sun Jul 27 10:03:23 MST 2014
I tried the same example code but with the Iar EW ARM, and everything now is working.
After this test if I connect(without disconnecting power) the LpcXpresso debugger(code red probe+) the system work fine, but if I cycle the power and re-connect and rebuild the code the system doesn't work.

Could someone help me?

0 Kudos
Reply

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Wed Jul 09 08:32:48 MST 2014
Could someone give me help or try the lpcopen code?
0 Kudos
Reply

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Fri May 23 15:18:24 MST 2014
I'm using LpcXpresso 7.1.1, with the RedProbe+, and the Embedded Artists LPC4088 Dev kit, and the following SD card:

1 512MB Kingstone
1 1GB KingStone
1 4GB SDHC Sandisk
1 2GB MicroSD with adapter

I never reach to pass this function: Chip_SDMMC_Acquire

It always return 0, and this happen with "app_sdmmc_meas" example code and "periph_sdmmc" example code.

Inside the Chip_SDMMC_Acquire, when the system arrive at

STATIC int32_t getCID(LPC_SDC_T *pSDC, uint32_t *pCID)
{
int32_t Ret = SDC_RET_FAILED;
SDC_RESP_T Response;
uint32_t RetryCnt =  20;

while (RetryCnt > 0) {
Ret = executeCmd(pSDC, SD_CMD2_ALL_SEND_CID, 0, &Response);
if (Ret == SDC_RET_OK) {
pCID[3] = Response.Data[0];
pCID[2] = Response.Data[1];
pCID[1] = Response.Data[2];
pCID[0] = Response.Data[3];
return SDC_RET_OK;
}
RetryCnt--;
}

the "executeCmd(pSDC, SD_CMD2_ALL_SEND_CID, 0, &Response);" never return SDC_RET_OK.
And I don't know how to fix it.

thank you
Alessio

PS: By looking the code of LPCOpen for LPC4088, and merging it with the LPCOpen for LPC43xx, the version of LPC4088 may be incomplete with lot of missing parts such as GPDMA config, and other function. I may misunderstanding, correct me if I am.

0 Kudos
Reply

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sundarapandian on Wed May 21 09:37:39 MST 2014
It would be very helpful if you could provide more information on your problem, like the details on exact error that you are facing, tool chain used etc.

There is also a known issue of SD card detection (please see the history section for more information), intermittently the SD Card is incorrectly detected as MMC and the code sets up the card to wrong mode. This issue will be fixed in the new releases.
0 Kudos
Reply

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Tue May 20 01:01:10 MST 2014
Could someone test the example with a LPC4088 Dev board, in order to understand if it is only a my problem or not?
0 Kudos
Reply