LPC4078 FIFO overruns when reading from SD card

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC4078 FIFO overruns when reading from SD card

738 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akrylik on Tue Jun 03 04:31:06 MST 2014
Hi NXP Support

I've ported the app_sdmmc_meas project to the LPC4078 and it works perfectly but only as long as I keep the transfer speed (SDC_TRAN_CLOCK_RATE) below 6.5MHz.  However, if I increase the transfer speed passed 6.5MHz then the reads always fail with the SDC_STATUS_RXOVERRUN error even though DMA is being used.

Does anyone have any ideas of about why the LPC4078 is not keeping up? My system clock is running at 120MHz and the peripheral clock is 60MHz.

BTW, porting app_sdmmc_meas to the LPC4078 was very easy and only required me to update the IOCONF settings of the SD/MMC pins like this:

/* Initialize SD/MMC */
STATIC void initAppSDMMC()
{
memset(&sdCardInfo, 0, sizeof(sdCardInfo));
sdCardInfo.evsetup_cb = setupEvWakeup;
sdCardInfo.waitfunc_cb = waitEvIRQDriven;
sdCardInfo.msdelay_func = waitMs;

// SD_CLK
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 19, (IOCON_FUNC2 | IOCON_MODE_INACT));
// SD_CMD
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 20, (IOCON_FUNC2 | IOCON_MODE_INACT));
// SD_PWR
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 21, (IOCON_FUNC2 | IOCON_MODE_INACT));
// DAT lines
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 22, (IOCON_FUNC2 | IOCON_MODE_INACT));
Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 11, (IOCON_FUNC2 | IOCON_MODE_INACT));
Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 12, (IOCON_FUNC2 | IOCON_MODE_INACT));
Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 13, (IOCON_FUNC2 | IOCON_MODE_INACT));

Chip_SDC_Init(LPC_SDC);
}


标签 (1)
0 项奖励
回复
1 回复

609 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Sat Jun 07 10:02:32 MST 2014
Hi akrylic, I don't have the answer to your question, but I have a question for you.

I'm having some trouble with the same example code(app_sdmmc_meas), I never pass this function correctly: Chip_SDMMC_Acquire, and I'm working with the LPC4088 dev kit, so it should work without modification.

Could you tell me what version of the LPCopen you used for the porting?

What kind of SD card are you using?

Are you using the DMA?

thank you for your information

Alessio
0 项奖励
回复