3 Replies Latest reply on Sep 4, 2020 2:36 AM by GaneshD_41

    Cannot get DMA trigger output to work with a chain of two descriptors

    ChRe_4711096

      I'm trying to achieve the following:

      One component in my design outputs a trigger signal. On each positive edge of this output, I'd like use one DMA channel to do the following things:

      - Transfer one halfword from the SAR ADC to a 16-bit UDB

      - Transfer one word from a timer to a memory location (uint32_t)

      - when both are done, the DMA channel should generate one output trigger that is routed into the UDB.

       

      I connected the DMA channel's trigger input and output to a scope.  I can see the input triggers, but the output is silent. These are my descriptors:

      DMA_EOS_descr_adc.png

      DMA_EOS_descr_timer.png

      My guess is that, since descr_timer is chained back to descr_adc, an endless loop is created and no trigger is generated because the entire (endless) chain is never completed. However, I've tried many other combinations of settings and none of them had the desired result.

       

      I've also attached the current state of the whole project (the DMA component in question is in the top level design).

       

      I'm thinking about handling DMA errors with the DMA's interrupt. It would be triggered only on errors, not on channel completion. Any advice on this is appreciated, but not the main point of this question.