2014-01-30 09:43 AM
hello dear forum ,
I am trying to measure 2 ADC channels on F103 with DMA I am following the DMA ADC example in peripheral libraryADC_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
#f103-adc-dma
2014-01-30 11:24 AM
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.