2017-11-02 10:50 PM
Hi All,
We are using STM32F0 controller in our project. we tried enable ADC with DMA one shot mode. Currently we configured 6 ADC channels(ch1, ch2, ch3, ch7,ch8 and ch9) with DMA support and we tried access other ADC channels in polling. We observed following
1. We are enabling 6 ADC channels in the 100us timer ISR, so DMA will get data every 100us.
2.But in the above configuration we are not getting data from the Polling ADC channels. We observed it is caused by overlap bwn DMA read in 100us timer and ADC polling read.
We need both DMA data(6 ADC channels data) and polling ADC channels data. How we can achieve this with out disabling the 100us timer interrupt.
Please help us to solve this issue.
Thanks in advance,
Basavanagouda.
#adc-poll #dma-adc #stm32f0 #timer-interrupts2017-11-03 10:44 AM
Before optimizing, use the DMA to read all the ADC channels you need all the time and fill up an array in circular mode.
At 100 us, you have more than enough time to run all channels you need. Then read the array whenever you need it. You get the latest values without waiting for the conversion.
After this works, you may optimize. Use STM32 Cube board examples in HAL or LL to get some guidance.