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.

TMS570LC4357: DMA Roll over queiry

Part Number: TMS570LC4357

Hi, Does DMA support Roll over option for RAM to RAM transfer. If so, can you please provide the dma settings along with some example source code ?

  • Hi Bharath Kumar,

    Please refer below example.

    0243.DMA_memory_to_memory.zip

    In this example i am doing memory(RAM) to memory(RAM) transfer using DMA. Once the block of transfer completed then i am clearing the receive buffer and initiating the DMA transfer again.

    The main setting for rollover is that we should ON the Auto initialization.

    --
    Thanks & regards,
    Jagadish.

  • Hi,
    To be precise, let us say I have defined two buffers A, B of 1kb size. I want to copy from offset 512 of  buffer A to offset 0 of buffer B with size 1kb, so that whole buffer A gets copied to buffer B.


    Ex::

    Buffer A::


    Now i want to copy from offset 512 to Buffer B offset 0 and the buffer B should have the following data:




    Can I get DMA Roll over in this way ? or Will the DMA Rollover work in a different way  ?

  • Hi Bharath Kumar,

    Can I get DMA Roll over in this way ? or Will the DMA Rollover work in a different way  ?

    A single DMA channel cannot be roll over like this way. So, it is not possible to implement this requirement using single DMA channel.

    However, i can suggest you a method using two different DMA channels.

    In this method use two DMA channels,

    use the first channel to shift the data from buffer-A's 513 to 1024, to move into the buffer-B's 1 to 512 locations. And use the second DMA channel to shift the data from buffer-A's 1 to 512 to the buffer-B's 513 to 1024 locations. So, in this method we are dividing 1024 elements transfer into the two 512 bytes.

    In this way you can implement your requirement. Please try to implement the code on your own, if you face any difficulty in your implementation i can assist you.

    --
    Thanks & Regards,
    Jagadish.