2010-07-08 04:47 PM
using ADC to convert two channels
2011-05-17 04:58 AM
I guess I don't understand your reluctance to use DMA. It is very easy to configure and you can still use interrupts so you know when the results are updated.
There is only one ADC conversion result register so unless you're careful the last value can be easily overwritten.2011-05-17 04:58 AM
You can use injected channel for up to 4 ADC conversions without DMA. Look at ST’s injected channel code. The first channel converted result ends up in ADC_JDR4, the second in ADC_JDR3.
With DMA you can start a continuous conversion with ADC values going to RAM. No interrupts required. Simply grab the latest value from RAM. I have used this with one DMA channel. I think it might work with two or more.2011-05-17 04:58 AM
If the issue is that there is insufficent time to read the ADC data register before it is overwritten by the next conversion, then I would have thought that you could increase the sampling times for the two channels to give you a longer time to grab the data.