lpcware

LPC4078 FIFO overruns when reading from SD card

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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);
}


Outcomes