DMA one follow one

Hi, I hope someone help me.
1. In case I use identical DMA to transport data, I must wait the over of the precedent, and then I can do next DMA. Or the next DMA and later will not function. Why?
2.  When I use two kinds of DMA, if the precedent is busy, and the next is coming. Will the next function? I haven't test.

Sincerely,

Xinxizyf.

  • 0
    •  Analog Employees 
    on Feb 5, 2013 5:10 AM

    Hi Xinxizyf,

               I am not clear on what you are trying to do. I assume that you are trying to understand what happens when you use two DMAs of the samekind like two External port DMAs or two Linkport DMAs or a combination of DMAs from different peripherals in parallel. Please correct me if my understanding is wrong.

    When you use more than one DMAs in parallel, the transfers will start independant of the other one. The DMA priority will decide which DMA will get the priority when both the DMAs are accessing the same internal memory block. Otherwise there should not be any issues. It will be good if you can provide more details about the question and let me know if you face any issues.

    Best Regards,

    Jeyanthi

  • hello, Jeyanthi.

    1. I use dma0 and dma1 to test. There is no problem, because the precedent has finished when the next begin.

    2. When I use dma0 to transfer data in external interrupt routine, the next must wait until the precedent finish, or all the later transfers will fail.

    DMA Status (DSTAT) Register will tell anything.

    3. The attachment is my two dma routine.

    Sincerely,

    Xinxizyf.

  • Sorry, the attachment can' be uploaded in reply.

  • 0
    •  Analog Employees 
    on Apr 3, 2013 5:01 AM

    Hi,

          Thanks for sharing your code. I checked the code. I understand that you have two DMAs enabled in the application code where you need the DMAs to be sequenced(i.e after the first DMA is complete the second DMA needs to be started).

    I can think of two options:

    1. Enable the first DMA and wait for the DMA completion before starting the next DMA. You can use the software flag set inside the ISR to check the DMA completion status of the first DMA or DSTAT register status bits can be used. If the DMAs need to be continuously disabled and re-enabled then core needs to check for the status always.

    2. You can use the DMAs in TCB chaining mode. The chain pointer field in the TCB for the first DMA can point to the second DMA and the  chain pointer field in the TCB for the second DMA can point to the first DMA. In this way the DMAs will be automatically sequenced. The Audio Passthrough examples available with VDSP++ under the below path use the same approach:

    C:\Program Files (x86)\Analog Devices\VisualDSP 5.0\TS\Examples\ADSP-TS201 EZ-KIT Lite\AudioPassThrough C

    You can use them as reference and create your code.

    Best Regards,

    Jeyanthi