I want to convert 4 analog input in the same time, I chose the stm32f3 discovery because it contains 4 ADCs. The problems is that I don't know how to get them working together. I have read that only two of them can work simultaneously ADC1 and ADC2, ADC3 and ADC4.
My question is what's configuration have I to do for this stuff?
Should I use DMA mode, if yes how ?
In the RM0316 reference manual of STM32F302xx, STM32F303xx and STM32F313xx advanced ARM-based 32-bit MCUs I found in the paragraph 12.8:
Dual ADC modes
In devices with two ADCs or more, dual ADC modes can be used (see Figure 69):
- ADC1 and ADC2 can be used together in dual mode (ADC1 is master)
- ADC3 and ADC4 can be used together in dual mode (ADC3 is master)
In dual ADC mode, the start of conversion is triggered alternately or simultaneously by the ADCx master to the ADC slave, depending on the mode selected by the bits DUAL[4:0] in the ADCx_CCR register.
Four possible modes are implemented:
- Injected simultaneous mode
- Regular simultaneous mode
- Interleaved mode
- Alternate trigger mode