2 Replies Latest reply on Sep 8, 2017 7:24 AM by user_1377889

    Counter with DMA

    scarralero_2319841

      Hello,

      I'm trying to do a DMA transfer of the capture value but I can not read anything.

       

      image1.JPG

      Configure of DMA :

       

      #define DMA_BYTES_PER_BURST      4

      #define DMA_REQUEST_PER_BURST    1

      #define DMA_SRC_BASE              (CYDEV_PERIPH_BASE)

      #define DMA_DST_BASE             (CYDEV_SRAM_BASE)

       

          Channel_Counter3 = DMA_Counter3_DmaInitialize(DMA_BYTES_PER_BURST, DMA_REQUEST_PER_BURST, HI16(DMA_SRC_BASE), HI16(DMA_DST_BASE));

          counter3_TD_0 = CyDmaTdAllocate();

          CyDmaTdSetConfiguration(counter3_TD_0, 4, counter3_TD_0, DMA_Counter3__TD_TERMOUT_EN | CY_DMA_TD_INC_SRC_ADR );

          CyDmaTdSetAddress(counter3_TD_0, LO16((uint32) Counter_3_STATICCOUNT_LSB_PTR), LO16((uint32)counter[2]));

          CyDmaChSetInitialTd(Channel_Counter3,counter3_TD_0);

          CyDmaChEnable(Channel_Counter3, (1u));

      Captura.JPG

      DMA hardware Request :Rising edge

      Is something wrong?

       

      I want to transfer the capture data and then active the interrupt and reset the counter.

       

       

      Regards and thank you!