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.

SL2RAM uDMA3

Other Parts Discussed in Thread: SPRCA03

Hi,

I'm using a C6472 DSP chip.

in order to move data between the different cores, we are using a section of the SL2RAM as shared memory. The source core put data into that section and the destination core reads it back. the IPC registers (IPCGR and IPCAR) are used to send semaphores between the cores.

The code is working fine, but its taking too long. We have traced it down and found that "memcpy" is the culprit. As such we would like to use uDMA to do the data transfer and free up the CPU.

I could not find information on how to DMA data to/from the SL2RAM into/out of the Mega module.

My question: Can I use uDMA3 to access SL2RAM, and if possible, it will be very helpful to have a sample example.

khaled.

  • EDMA3 can access it. And please use the global address. You may use the EDMA example in CSL release with the global address of shared memory as parameters.

  • nmin,

    I checked the CSL library and found several examples for eDMA. Thanks.

    The closesed example for memory to memory transfer that I could find is Edma_chain_example.pjt.

    But I fail to understand how the DMA is setup. More presisely, I fail to understand why the example is using CLS_EDMA3_CHA_GPINT0 and CSL_EDMA_CHA_TEVTLO6: Why its using the HPI channel and the Timer channel? Shouldn't be using a more generic channel?

        /* Module setup */
        dmahwSetup[CSL_EDMA3_CHA_GPINT0].paramNum = CSL_EDMA3_CHA_GPINT0;
        dmahwSetup[CSL_EDMA3_CHA_TEVTLO6].paramNum = CSL_EDMA3_CHA_TEVTLO6;

    I looked at SPRU727D (Enhanced DMA controller) but was not able to find enough information to explain how those channels are used. Any additional help that you can provide on this subject will be very helpful.

    khaled

  • They are EDMA event source. You can find them in datasheet. They are used to trigger EDMA transaction. In your case, you may not need them. You can manually start it.

  • nmin

    Glad to have you on the other side to explain this uDMA engine to me.

    Followed your advices and I got to the point where I compiled and  run the un-modified copy of csl_c6486\example\c6486\edma\edma_chain_example. However, the data is not transferred: both dstBuff1 and dstBuff2 are both "0".

    I'm not sure if it has something to do with cache. Both those buffers seems to be cach'ed.

    Any ideas?

    khaled.

  • just an update.

    To test the cache problem, I tried to invalidate the cache, but no success.

    It must be something simple!!!!

    Do you have an example code that you run, and you know its working? At least we will have the same reference point and it could help speed up the resolution of this issue.

    khaled.

  • I recommend to run the original example without modification. After it works on your board, then start from there and modify it for your application. The released example code was tested.

  • I tried that, but it seems that the example is for ccs4 and I'm using ccs3.

    khaled.

  • Hi.

    You definitely want to try the free online training on how to use the EDMA3.

     

    You can find it here:

    http://focus.ti.com/docs/training/catalog/events/event.jhtml?sku=OLT110001.  (Choose the section called "EDMA3/QDMA/IDMA")

    This training was immensely helpful in getting to know the EDMA3 and it also covers the QDMA and IDMA as well.

     

    I also suggest reading the EDMA3 user guide. Between this document and the training, you will become an expert, and the example projects will make perfect sense:

    http://www.ti.com/litv/pdf/sprug11a

     

    Also tag the section about the DAT module in the training and try it out. This will allow you to pretty much replace all memcpy() functions with equivalent DAT functions, allowing your CPU to be freed up, and add huge performance increases

    The EDMA3 is a VERY powerful device that makes your life real easy. Not to mention the huge performance improvement of you application. You will really enjoy it once you start to see its advantages..

    Regards.

    Estian

  • Thanks Estian. The DAT_copy( ) is exactly what I need.

    However, I tried to run the DAT example on a C6472 with no success.

    The example that I tried came with the CSL library csl_c6472/example/dat/src/Dat_example.c (see http://focus.ti.com/docs/toolsw/folders/print/sprca03.html) .

    There is no warning, all function returns a proper value, but the data is not transferred from src to dst!

    Should I modify anything to make that example code run on a C64x+?

    khaled.