Some dma ap notes (ther eis a 16 bit example in one of them if I am not mistaken, AN61102 ?) -
http://www.cypress.com/documentation/application-notes/an52705-psoc-3-and-psoc-5lp-getting-started-dma AN52705 Getting Started with DMA
http://www.cypress.com/documentation/application-notes/an84810-psoc-3-and-psoc-5lp-advanced-dma-topics AN84810 PSoC® 3 and PSoC 5LP Advanced DMA Topics
http://www.cypress.com/documentation/application-notes/an61102-psoc-3-and-psoc-5lp-adc-data-buffering-using-dma AN61102 PSoC® 3 and PSoC 5LP - ADC Data Buffering Using DMA
http://video.cypress.com/video-library/search/dma/ Videos on DMA
https://www.youtube.com/results?search_query=dma+psoc Videos on DMA (some overlap)
DMA is complicated, but not as complicated as you think. Since you can use a single TD in a loop you will not need more than one TD to get your 1024 words into memory, two TDs when you want to use double buffering and additional two TDs when grabbing the buffers and moving them to another location. No counting on your side is needed, that is performed by the DMA channels from which you will need two, one for each transfer.
So if I hear you right even though the adc_getsample16() only returns one sample everytime the eoc is flagged I can use one TD to pass that data to a buffer, and on the next eoc flag it will grab the new sample and place it in sequentially in the buffer right after the first sample until it has done that for 1024 samples, and then start to repeat that same process?
I must have read the ANs wrong, I did not think that was possible to use the same TD without overwriting the same destination address each time.
Also thanks danaaknight, I saw those ANs but not the videos. I will take a look. it seems like the example may be what I am trying to do actually.
Hope the info helps.
Yes, quite right. You may specify to increase the destination address by the number of bytes a TD transfers. You may specify that for the source address as well, but in your case -since you get your data from a peripheral- that would not make sense.
Have a look at the specifications you can make when using the DMA-wizard from Creator's Tools-menu.