STM32ADC_Arduio

The STM32 is a family of microcontroller ICs based on the 32-bit RISC ARM Cortex-M7FCortex-M4FCortex-M3Cortex-M0+, and Cortex-M0 cores.[1]STMicroelectronics licenses the ARM Processor IP from ARM Holdings. The ARM core designs have numerous configurable options, and ST chooses the individual configuration to use for each design. ST attaches their own peripherals to the core before converting the design into a silicon die. The following tables summarize the STM32 microcontroller families.

The STM32 is a family of microcontroller ICs based on the 32-bit RISC ARM Cortex-M7FCortex-M4FCortex-M3Cortex-M0+, and Cortex-M0 cores.[1]STMicroelectronics licenses the ARM Processor IP from ARM Holdings. The ARM core designs have numerous configurable options, and ST chooses the individual configuration to use for each design. ST attaches their own peripherals to the core before converting the design into a silicon die. The following tables summarize the STM32 microcontroller families.

Family: [xx][1][73]

Code

Core

Max freq [MHz]

Max FLASH [KB]

Max SRAM [KB]

Target

F0

CortexM0

48

256

32

Mainstream

F1

CortexM3

72

1024

96

Mainstream

F2

CortexM3

120

1024

128

High performance

F3

CortexM4

72

512

80

Mainstream

F4

CortexM4

180

2048

384

High performance

F7

CortexM7

216

2048

512

High performance

H7

CortexM7

400

2048

1024

High performance

L0

CortexM0+

32

192

20

Low power

L1

CortexM3

32

512

80

Low power

L4

CortexM4

80

1024

320

Low power


 

 

Pins for STM32F103 series

 

STM32ADC_Arduio

STM32ADC_Arduio

 

 

STM32ADC_Arduio

STM32ADC_Arduio

 

 

STM32ADC_Arduio

STM32ADC_Arduio

STM32ADC_Arduio

 

 

64 Pins

 STM32ADC_Arduio

100Pins

STM32ADC_Arduio

144 Pins

 

STM32ADC_Arduio

 

 

 

 

STM32F103ZET6 PINS FOR ADC

 

                                              STM32F103ZET6 ADC PINS                                                    

Channel

ADC1 IO

ADC2 IO

ADC3 IO

Channel0

PA0

PA0

PA0

Channel1

PA1

PA1

PA1

Channel2

PA2

PA2

PA2

Channel3

PA3

PA3

PA3

Channel4

PA4

PA4

PF7

Channel5

PA5

PA5

PF7

Channel6

PA6

PA6

PF8

Channel7

PA7

PA7

PF9

Channel8

PB0

PB0

PF10

Channel9

PB1

PB1

Interior VSS

Channel10

PC0

PC0

PC0

Channel11

PC1

PC1

PC1

Channel12

PC2

PC2

PC2

Channel13

PC3

PC3

PC3

Channel14

PC4

PC4

Interior VSS

Channel15

PC5

PC5

Interior VSS

Channel16

Interior temperature

Interior VSS

Interior VSS

Channel17

Interior Vrefint

Interior VSS

Interior VSS

 

 

Second : The ADC for STM32 by Arduino

 

Step 1: Seek the list about pins ,get your choice of pin for ADC. I get the PA3. 

 

Step 2: Begin your coding.

       I will list two ways to get the pot’s voltage by ADC.

 

       The first one’s code: 

STM32ADC_Arduio

 

 

The second code:

STM32ADC_Arduio

About the second one , I get the example of Github’s package.

 

STM32ADC_Arduio 

 

There are six Arduino projects

 

STM32ADC_Arduio

      Open the file called STM32ADC.c, I find the functions for coding . Using    these API we should make some change ,like the pins .We should find the pins than we choose named PA3 .Don’t care the D23 ,D33 and so on ,you can find the at boards.h ,so just named the pins as usual cause computer knows those .The function you can also know from the notes .

To get the ADC knowledge you can seek them in internet . They will sure you better than me . You’d must know some key words ,like channel ,sample rate … and better to get how ADC work and working process.