Other Parts Discussed in Thread: OMAPL138, CSD
Tool/software: TI-RTOS
Hi
we are using our own board with the c6746 DSP and an sandisk emmc (4.51) device connected using 8 data bit to mmcsd0.
I am using the latest omap138 pdk 4.1.0.6
I am trying to use the mmc driver example project :
MMCSD_lcdkOMAPL138_c674xTestProject
but instead of using the main.c test source, that is for testing the SD card I am using the main_emmc.c for emmc device.
as the omap138 is not define i added definition for omap138 when ever there is a definition for omap137 DEVICE (as the emmc module of both part need to be the same)
I also added the line:
hwAttrsConfig.supportedBusWidth = MMCSD_BUS_WIDTH_8BIT;
as I use 8bit data interface.
The test file mmc configuration look like this:
if(MMCSD_socGetInitCfg(MMCSD_INSTANCE_EMMC,&hwAttrsConfig)!=0) {
MMCSD_log ("\nUnable to obtain config.Exiting. TEST FAILED.\r\n");
return;
}
#ifdef MMCSD_EDMA_ENABLED
gEdmaHandle = (EDMA3_RM_Handle)edma3init(MMCSD_EDMACC_NUM, &edmaResult);
#endif
//#if defined(SOC_OMAPL137)
#if defined (SOC_OMAPL137)|| defined (SOC_OMAPL138)
/* There is no eMMC support for OMAPL137. This test is verified
* with MMC card inserted into the same slot used for SD card testing.
* Default card type will be SD. Change the card type to eMMC for the test here
*/
hwAttrsConfig.cardType = MMCSD_CARD_EMMC;
hwAttrsConfig.supportedBusWidth = MMCSD_BUS_WIDTH_8BIT; //ilan
#endif
#ifndef MMCSD_EDMA_ENABLED
if(hwAttrsConfig.enableInterrupt==1) {
MMCSD_log ("\n****** Non-DMA: Interrupt Mode ******\r\n");
} else {
MMCSD_log ("\n****** Non-DMA: Polling Mode ******\r\n");
}
#else
MMCSD_log ("\n****** DMA Mode ******\r\n");
#endif
MMCSD_log("Read/Write test with sector size %d bytes which involves ",SECTORSIZE);
MMCSD_log("reading/writing %d blocks at a time, with a total transfer size of %d bytes\n",TESTSECTORS,TEST_TOTAL_BYTES_TO_TRANSFER);
#ifdef MMCSD_EDMA_ENABLED
hwAttrsConfig.edmaHandle = gEdmaHandle;
#endif
if(MMCSD_socSetInitCfg(MMCSD_INSTANCE_EMMC,&hwAttrsConfig)!=0) {
MMCSD_log ("\nUnable to set config.Exiting. TEST FAILED.\r\n");
return;
}
#if !defined(SOC_OMAPL137) && !defined(SOC_OMAPL138)
GPIO_init();
EmmcsReset();
#endif
#ifdef MEASURE_TIME
profile_init();
#endif
ret =MMCSD_init();
if ((ret = MMCSD_open(MMCSD_INSTANCE_EMMC, NULL, &handle))!=MMCSD_OK)
{
MMCSD_log ("\nMMCSD Open failed with return code %d\n",ret);
}
HSMMCSDReadWriteTest(handle);
I can see the application run till the MMCSD_open line but do not come out from the open command.
as the driver is probably complied with optimization it is hard for me to debug the driver code.
what can be the reason that the open command fails?
for my board I also tried to configure all the relevant pin for MMCSD pinmux and reset line. I also notice (in debug mode) that the mmcsd registers did not changed , as if they were not configred at all.
I tried to run the code on LCDK 6748 board and the test pass for sd card ( i use the main.c file as there is an SD card on the LCDK board)
is there any configuration for the emmc that I miss? do I need to call
MMCSD_Params_init(&MMCSDParams);
I didnt find any documentation that define the
MMCSD_Params
Best Regards
Ilan