cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407ZG Additional ADC functions

mhinge9
Associate
Posted on August 10, 2016 at 07:24

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?

3 REPLIES 3
Walid FTITI_O
Senior II
Posted on August 11, 2016 at 14:14

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

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

. 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-

Posted on August 11, 2016 at 15:23

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&currentviews=279]this thread.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
raptorhal2
Lead
Posted on August 11, 2016 at 16:10

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