cancel
Showing results for 
Search instead for 
Did you mean: 

help ! one question - F103 DMA ADC

mehmet.karakaya
Associate III
Posted on January 30, 2014 at 18:43

hello dear forum ,

I am trying to measure 2 ADC channels on F103 with DMA I am following the DMA ADC example in peripheral library

ADC_InitStructure.ADC_NbrOfChannel = 2; 
.................................... 
DMA_InitStructure.DMA_BufferSize = 8; 
...................................

If I typethe abovecode do I get the following picture ? 2nd question = once started, does the ADC continue writing new measured values to buffer array non stop ?and when reached the buffer end ,does itbegin writing to first, second, third .......element of array ? thank you 0690X00000602qwQAA.jpg #f103-adc-dma
1 REPLY 1
Posted on January 30, 2014 at 20:24

Yes, should sequence them in the buffer. It will loop continuously if the DMA is set for circular operation. This will occur in the background.

You could make the buffer bigger, and interrupt on the DMA HT and TC signals to process half of the buffer at a time.

You could also set the ADC in a triggered mode, when at each trigger it would do you two samples from the list, and then wait for the next trigger.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..