4 Replies Latest reply on Sep 8, 2014 9:22 AM by user_14586677

    Why do I get message from DMA Wizard to paste this into my project?

    user_302397898

      Why do I get this message when I try to do a DMA Wizard on DMA_1 ? The build file is attached. Where should I actually paste these lines?  I have tried various places and they get optimized out of existence when I do a Clean and Build.

         

      I am trying to use the sequencing SAR to put analog data into the FIR filter where I will do a time-align on the two input channels. A secondary question is: how do I be sure that the next ADC starts with ADC_SAR input 0?  I have to keep them time aligned.  But this is a secondary question. Go back up to the first paragraph for my primary question. Why do I get the message below from the DMA Wizard and what do I do with it?  My Workspace bundle is attached.

         

      /* Variable declarations for DMA_1 */

         

      /* Move these variable declarations to the top of the function */

         

      uint8 DMA_1_Chan;

         

      uint8 DMA_1_TD[2];

         

       

         

      /* DMA Configuration for DMA_1 */

         

      #define DMA_1_BYTES_PER_BURST 2

         

      #define DMA_1_REQUEST_PER_BURST 1

         

      #define DMA_1_SRC_BASE (CYDEV_PERIPH_BASE)

         

      #define DMA_1_DST_BASE (CYDEV_PERIPH_BASE)

         

      DMA_1_Chan = DMA_1_DmaInitialize(DMA_1_BYTES_PER_BURST, DMA_1_REQUEST_PER_BURST, 

         

          HI16(DMA_1_SRC_BASE), HI16(DMA_1_DST_BASE));

         

      DMA_1_TD[0] = CyDmaTdAllocate();

         

      DMA_1_TD[1] = CyDmaTdAllocate();

         

      CyDmaTdSetConfiguration(DMA_1_TD[0], 2, DMA_1_TD[1], DMA_1__TD_TERMOUT_EN | TD_INC_DST_ADR | TD_AUTO_EXEC_NEXT);

         

      CyDmaTdSetConfiguration(DMA_1_TD[1], 2, DMA_1_TD[0], DMA_1__TD_TERMOUT_EN | TD_INC_DST_ADR);

         

      CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_SAR_Seq_SAR_SAR_WRK0_PTR), LO16((uint32)Filter_STAGEA_PTR));

         

      CyDmaTdSetAddress(DMA_1_TD[1], LO16((uint32)ADC_SAR_Seq_SAR_SAR_WRK0_PTR), LO16((uint32)Filter_STAGEB_PTR));

         

      CyDmaChSetInitialTd(DMA_1_Chan, DMA_1_TD[0]);

         

      CyDmaChEnable(DMA_1_Chan, 1);