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.

RM48L952 - Large DMA Transfers - Best way to implement flow control?



Hi,

I am transferring a large amount of data out of the EMIF (>1MB).  I use two DMA channels for this, firstly DMA0 for the number of packets (per block) divisible by 4096 (limit of DMA frame) and DMA1 for any remainders.

The DMA system works well, but I need to implement flow control.  I need to pause the DMA in response to a hardware signal (or software flag via an Interrupt).

Can anyone please suggest any novel ways of implementing this without simply disabling the DMA0:1 altogether.

Thanks

Stomp!

  • Hi Stomp,

      Once a channel is started responding to a DMA request it will keep going until the end of the frame or the entire block depending how you setup the trigger type. The best way to stop the DMA for these two channels is by disabling them in the HWCHENA/SWCHENA registers.

  • Hi Stomp,

    Can you pls let us know if the above response helps ? If yes pls close this thread.

  • Hi,

    Its a pitty that the DMA engine can not be paused (on a frame or block boundary) via some external control, say for example a IO pin.  

    To solve the problem I triggered an interrupt at the end of each boundary of transfer.  During this interrupt I check if the external pin is in a state allowing for transfer, and if so I setup the DMA to do another block until the entire packet is sent. 

    I have a second interrupt handler from the IO pin and when the edge of the pin transitions I start the DMA if it is not already started.

    Its not a very elegant solution as it consumes lots of clock cycles, but it works.

    Cheers

    Stomp!