This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28069 - Continuous sampling, use DMA to transfer to a buffer

Expert 1570 points

Hi,

I'm working on a project where I'd like to sample 6 ADC channels continuously and store all samples in a buffer. Then, after X samples have been collected, trigger an interrupt and process the samples (basically do averaging and pass the data on).

I saw some code snippets on the forum, but only for one channel.

My question - How can I tell the source-address to increment, but then after 3x32 bit (which are 6 ADCRESULTs) burst, tell it to reset to the initial address ?

The logic is as follows. Start from source address of ADCRESULT0, each tranfer is 32 bit, so we need to increment by 2 each time. Then, after transferring channels 5 and 6, reset the source address to ADCRESULT0 ?

The destination address increments all the time until some point...

Second question - which is better to use as trigger - ADCINT1, or the special interface SEQ1INT (as mentioned in http://www.ti.com/lit/ug/sprufb8d/sprufb8d.pdf)  ?

It would be great to see a working example for the above application (continuous sampling, store in buffer etc)

Thanks a lot

  • Mojo,

    You may want to be careful about the document that you referenced.  That is a reference guide for the F2833x DMA, which is going to be different from F2806x.

    I think the DMA "wrap" feature will work for you to restore the original SRC/DST addresses.

    -Tommy