Hi,
I am using AM335x EVM and trying TI starterware boot using SD card. I noticed that the ImageCopy function in boot loader takes 800msec to copy 84kb file from SD card to DDR3. This is quite a long time. I was wondering if SD card read is taking more time!. I tried a sample application based on Starterware application /beaglebone/hs_mmcsd/ example to just read a file from SD card and copy it to DDR3. Surprisingly it took just 10msec to copy a file size of around 100kB.
I Looked in to the boot loader SD card initialization code and the hs_mmcsd SD card initialization code and both are different. I tried to use the SD card intitialization code from hs_mmcsd into boot loader SD initialization but it doesn't work. It comes to the copyImage function and stops there!. The data rate in SD read during boot is just 100kB/sec where as the same SD read in hs_mmcsd is more than 20MB/sec?
Please refer the SD initialization code in boot loader and hs_mmscd application.
In boot code SD initialization
/* Basic controller initializations */
HSMMCSDControllerSetup();
/* First check, if card is insterted */
while(1)
{
if (MMCSDCardPresent(&ctrlInfo) == 0)
{
UARTPuts("MMC/SD Card not found\n\r", -1);
}
else
{
break;
}
}
/* Initialize the MMCSD controller */
MMCSDCtrlInit(&ctrlInfo);
MMCSDIntEnable(&ctrlInfo);
HSMMCSDFsMount(0, &sdCard);
In hs_mmcsd example SD card initialization
/* Setup the MMU and do necessary MMU configurations. */
MMUConfigAndEnable();
/* Enable all levels of CACHE. */
CacheEnable(CACHE_ALL);
/* Configure the EDMA clocks. */
EDMAModuleClkConfig();
/* Configure EDMA to service the HSMMCSD events. */
HSMMCSDEdmaInit();
/* Perform pin-mux for HSMMCSD pins. */
HSMMCSDPinMuxSetup();
/* Enable module clock for HSMMCSD. */
HSMMCSDModuleClkConfig();
DelayTimerSetup();
#ifdef MMCSD_PERF
PerfTimerSetup();
#endif
/* Basic controller initializations */
HSMMCSDControllerSetup();
/* Initialize the MMCSD controller */
MMCSDCtrlInit(&ctrlInfo);
MMCSDIntEnable(&ctrlInfo);
/* First check, if card is insterted */
/* while(1)
{
if (MMCSDCardPresent(&ctrlInfo) == 0)
{
UARTPuts("MMC/SD Card not found\n\r", -1);
ret=1;
break;
}
else
{
break;
}
}
if(ret)
HSMMCSDFsProcessCmdLine();
If i use the SD initilization code from hs_mmcsd in the boot loader, it doesn't work!
I would like to know why the SD card is configured and works in low speed during boot and what needs to be done to configure it for high speed during boot?
Please let me know your inputs.
Regards,
Seetaram