SD CARD DRIVER ERROR

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

SD CARD DRIVER ERROR

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gonzalo_Sipel on Thu Nov 20 12:34:45 MST 2014
Hello:
         I'm working with a LPC1788 and I'm using the SD interface.
My problems is in [color=#c33]Chip_SDMMC_WriteBlocks()[/color] function which is into the[color=#c36] sdmmc_17xx_40xx.c[/color] file. This problems occurs when I try to write more than 512 bytes in the same write operation because the function gets stuck waiting the transfer state:

[color=#c30]while (Chip_SDMMC_GetCardState(pSDC, pCardInfo) != SDMMC_TRAN_ST) {}[/color]

Has anyone had a problem like this?
Labels (1)
0 Kudos
2 Replies

413 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gonzalo_Sipel on Wed Feb 18 04:29:11 MST 2015
Dear Spikke
I have fixed this trouble doing the following modification in sdmmc_17xx_40xx.c file

int32_t Chip_SDMMC_WriteBlocks(LPC_SDC_T *pSDC,
   SDMMC_CARD_T *pCardInfo,
   void *buffer,
   int32_t startBlock,
   int32_t blockNum)
{
....

#ifdef SDC_DMA_ENABLE
Chip_DMA_Stop(LPC_GPDMA, Event.DmaChannel);
#endif
if ((blockNum > 1) || (Chip_SDMMC_GetCardState(pSDC, pCardInfo) == SDMMC_RCV_ST)) {
/* Send Stop transmission command */
[color=#f00]while([/color]stopTranmission(pSDC, pCardInfo->rca) != SDC_RET_OK[color=#c00])[/color]; 
}
....


Regards
0 Kudos

413 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by spekkie on Sat Feb 07 07:51:52 MST 2015
Yes, I am experiencing almost the same problem with a LPC4088, but I'm able to send more data at a time before it gets stuck. Anyone got a fix for this?
0 Kudos