This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem in testing emmc peripheral from CCS in DM8148 custom board

I am using a DM8148 custom board consisting of an emmc card (Part no:- N2M400HDB321A3CF)connected to the mmc slot. I am using code composed studio (CCS) and XDS100v2 debugger. When I am trying to debug the the CCS code for sdmmc_card which was given for DM8148 evm to test the mmc, I am not getting anything in the command line when i probe using oscilloscope while it is showing the clock while probing.
I am having the following doubts

1) Can the CCS sdmmc_card test code used for testing the emmc as it is?

2)If no then what more changes needed to be carried out in the code for testing the emmc  or where i can find a test code for CCS for testing the emmc ?
 
I have attached the sdmmc_card code to run in CCS to test the mmc card for DM8148.

Any help in this will be highly appreciated.

sdmmc_card.rar
  • Hi Debasish,

    The test code referred to MMC, SD and SDIO cards, bot not eMMC. So I doubt this test code can be used for eMMC.

    Prior to run the test (BB_011_SDMMC_CARD_Test.out), you should run the GEL function:

    DM814X System Initialization --> SD_MMC_Setup

    hotmenu SD_MMC_Setup()
    {
        GEL_TextOut("\t ***** This GEL function is not yet tested....***** \n");                                          
         
        WR_MEM_32(PINCNTL1, 0x00050001);  
        WR_MEM_32(PINCNTL2, 0x00060001);  
        WR_MEM_32(PINCNTL3, 0x00060001);  
        WR_MEM_32(PINCNTL4, 0x00060001);  
        WR_MEM_32(PINCNTL5, 0x00060001);       
        WR_MEM_32(PINCNTL6, 0x00060001);  
         
        WR_MEM_32(CM_ALWON_MMC_HS_1_CLKSTCTRL,    0x2); /*Enable UART0 Clock*/
        while(RD_MEM_32(CM_ALWON_MMC_HS_1_CLKSTCTRL)!=0x2);        /*Poll for Module is functional*/
     
        GEL_TextOut("\t ***** MMC/SD -1 is initialized....***** \n");                                          
     
    }

    Do you have the "MMC/SD -1 is initialized" message output?

    Then in sdmmc_card/test_sdmmc.c file we have:

    int main (void)
    {
        INT32 cardtype;
        INT32 is_highcap_card = 0;     
        INT32 retval = FAILURE;
        INT32 sdmmc_rwtest (hsmmc_t *base, INT32 highcap_card);
     
     
        printf ("SDMMC Tests:\n");
        printf ("*) The test verifies the command, clock and data lines of sd/mmc by writing and verifies the data written\n");
        printf ("*) Ensure that the Boot Switches are selected as specified in the README\n");
        printf ("*) Ensure that an SD card is inserted into the Base Board of your EVM\n\n");
     
        printf ("Running SDMMC Tests:\n");
        mmcinit((hsmmc_t *) HSMMC_BASE1);
         
        cardtype = detect_card((hsmmc_t *) HSMMC_BASE1, &is_highcap_card);
        switch (cardtype) {
        case MMC_CARD:
            printf ("\tMMC Card Detected\n");
            break;
        case SD_CARD:
            printf ("\tSD Card Detected\n");
            retval = sdmmc_rwtest((hsmmc_t *)HSMMC_BASE1, is_highcap_card);
            break;
        case SDIO_CARD:
            retval = FAILURE;
            printf ("\tSDIO Card Detected\n");
            printf ("Please Insert an SDIO Card and run this program again!\n");
            break;
        case UNKNOWN_CARD:
        default:
            retval = FAILURE;
            printf ("\tUnable to communicate with the card\n");
            printf ("\tEnsure that an SD card is inserted into the Base Board of your EVM\n");
            break;
        }
         
        if (retval == SUCCESS)
            printf ("\nSDMMC Test Passed\n");
        else
            printf ("\nSDMMC Test Failed\n");
     
    }

    Do you have the "MMC Card Detected" output message? If not, do you have the "Unable to communicate with the card" output message?

    Best regards,
    Pavel