2016-08-09 10:24 PM
I am using STM32F407ZG. I have 17 ADC channels as inputs and it is mentioned in the datasheet that there are 24,12bit ADC channels available to this chip. But how to configure these additional functions of the pin?
2016-08-11 05:14 AM
Hi hinge.madhur.001,
In fact, all the 24 ADC channel are clasiified additional in the datasheet to cbe configured as analog pins. SO , you have to just enabled the related ADCx and configure the pin to analog mode. Take a look to STM32F4x_hal_msp.c file in ADC porject of . for example , I recommend ''ADC_RegularConversion_Interrupt'' example at this path: STM32Cube_FW_F4_V1.13.0\Projects\STM324xG_EVAL\Examples\ADC\ADC_RegularConversion_Interrupt -Hannibal-2016-08-11 06:23 AM
You'd configure the pins in AIN (Analogue Input) mode, and then enumerate a list of pins/channels when setting up the ADC.
There is a 13 channel example in [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/stm32f4%20adc%20dma%2014%20analog%20inputs&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=279]this thread.2016-08-11 07:10 AM
I suspect the answer the poster needs is more fundamental. If I am wrong, ignore my prattle.
Each of the 3 ADCs has a multiplexor connected to 16 external channels. Most of the external channels are each connected to to 2 or 3 ADCs, but 8 are connected only to ADC3. To connect to all 24 channels it is necessary to configure, enable and start ADC3 plus at least one other ADC. Cheers, Hal