2012-04-02 09:52 PM
I have a project involving STM32F103RE.
A timer channel TIM2_CH2 triggers a continuous read on ADC1, which uses DMA1 into a buffer. What I want to do is set up ADC3 to read a different channel in a similar fashion using DMA2. * How can I make sure ADC1 and ADC3 are in sync? ADC3 has a different list of trigger options - is there a way I can start the continuous conversion off the same trigger? * If TIM5 has the same setup as TIM2, and both timers are started simultaneously (or right after another) can I use TIM5_CH1 to trigger ADC3 at the same time as ADC1 is triggered by TIM2_CH2? Note that I have already considered using ADC1/ADC2 in dual simultaneous mode, but the resulting data would then need to be post-processed because of how the DMA works.2012-04-11 04:54 PM
So, it can be done, and here's how:
Let's say you want to use ADC1 and ADC3 simultaneously, using DMA to push the results into 2 separate buffers.You can use a timer channel for each ADC to trigger the start of the continuous read.Then to get the ADCs in sync, you need to set the timers you've chosen in master/slave mode, such that one timer is gated by the enable of the other.