1 Reply Latest reply on Jan 5, 2018 1:59 PM by user_463759797

    PSOC 5  SAR ADC DMA to 8 bit EMIF


      I would like to dma from the SAR ADC to an 8 bit EMIF, 1MSPS.  I have configured one TD,


      I put a scope on the SAR EOC, and the WEN on the EMIF output.


      I only get 1 write per EOC, even if I set to increment destination address.


        Is this possible.



      #define PACKET       (2u)


      #define DMA_BYTES_PER_BURST (2u) /* should be 2 for 16-bit DMA transfer */

      #define DMA_REQUEST_PER_BURST (1u)

      #define BURST_LENGTH (PACKET) /* DMA burst length would need to be a multiple of 2 bytes for 16-bit DMA transfer */




          * Set up DMA to transfer data



          /* Write Data to external memory */



          DMA_ADC_TD[0] = CyDmaTdAllocate();

          CyDmaTdSetConfiguration(DMA_ADC_TD[0], BURST_LENGTH, DMA_ADC_TD[0], DMA_ADC__TD_TERMOUT_EN | TD_INC_DST_ADR );

          CyDmaTdSetAddress(DMA_ADC_TD[0], LO16((uint32)ADC_SAR_WRK0_PTR), LO16((uint32)CYDEV_EXTMEM_BASE));

          CyDmaChSetInitialTd(DMA_ADC_Chan, DMA_ADC_TD[0]);

          CyDmaChEnable(DMA_ADC_Chan, 1);

        • 1. Re: PSOC 5  SAR ADC DMA to 8 bit EMIF

          I hate to reply to my own question, but here goes:  You can't.  You will only every get one byte transferred to the EXTMEM 8 bit bus when coming from the ADC using DMA.


          However, it appears that you can use DRQ and NRQ even for DMA from SRAM to EXTMEM.


          I DMA'd into a 2 byte buffer in SRAM.  I chained the ADC DMA NRQ into DMA unit #2 DRQ which did an 8 bit transfer into EXTMEM from buffer[0].  It's NRQ chained into DMA Unit #3, which did an 8 bit transfer into EXTMEM from buffer[1].  Took most of a microsecond.


          Using fictitious data in memory to make it easy to see on a scope, I got the results I wanted.


          On to the next step.....