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.

TMS320C6748: How can I configure the DMA parameters for reading data form eMMC?

Part Number: TMS320C6748
Other Parts Discussed in Thread: OMAPL138

Hi TI Team,

    Would you help to provide a detail  DMA configuration for reading data form eMMC?

   for example:

   1. the OPT channel options parametters

   2. SCR

   3. A_B_CNT

    4. DST

   5. SRC_DST_BIDX

    6. LINK_BCNTRLD

    7. SRC_DST_CIDX

    8. CCNT

   I have tried to set a different set for these,but I can't read the correclty data form DMA.

   I am looking forwrad for your response.

thanks.

  • EMMC unlike DDR or onchip memory is not directly addressable memory. It uses a MMC protocol implementation. To use a DMA based driver implementation, you need to read and write to the MMCSD FIFO using DMA setting and let the FIFO send read write values to the eMMC. 

    The Processor SDK RTOS for OMAPL138 provides a MMCSD driver, you can look at the code for MMCSD_v0.c in the path pdk_omapl138_1_0_8\packages\ti\drv\mmcsd\src\v0

    MMCSD code for DMA configuration:

                        
                        paramSet.aCnt       = FIFO_WIDTH;
                        paramSet.bCnt       = FIFO_LEVEL/FIFO_WIDTH;
                        paramSet.cCnt       = (uint16_t) object->dataBlockCount * 8;
                        paramSet.srcBIdx    = 4;
                        paramSet.srcCIdx    = FIFO_LEVEL;
    
                        paramSet.destBIdx   = 0;
                        paramSet.destCIdx   = 0;
    
                        /* For AB-synchronized transfers, BCNTRLD is not used. */
    
                        paramSet.linkAddr   = 0xFFFFu;
    
                        paramSet.bCntReload = (uint16_t) 0;

    Even better would be if you can use the MMCSD driver that we provide for this operation as we are not tasked to support custom driver development on the E2E forums. The driver has only been tested on OMAPL138 with the SD interface as the OMAPL138 LCDK evaluation platform doesn`t provide an eMMC interface. However the driver has been tested with beagle bone black AM335x platform that contains a eMMC.

    Hope this helps

    Regards,

    Rahul 

  • Hi Rahul Prabhu,

         Thanks for your help,this fix my issue.

         I can't set the crrectly aCnt/bCan/cCnt parameters.but I am not sure when the cCnt value is dataBlockCont * 8,not Total_len / 64(aCnt * bCnt)?

    Thanks again!