Skip to content

GPIO setup

Marcus Comstedt edited this page Jul 18, 2020 · 9 revisions

The following GPIO setup is done by the original firmware on startup:

Port Pin Mode Pull up/down Speed Alternate function Initial value
A 0-7 analog - - ADC1
8 push/pull - very high MCO_1
9 open drain - low - H
10 push/pull - high - H
11 push/pull - very high OTG_FS_DM
12 push/pull - very high OTG_FS_DP
15 push/pull - medium - -
B 0-1 analog - - ADC1
2 push/pull - low - L
3 push/pull - high SPI1_SCK
4 push/pull - high SPI1_MISO
5 push/pull - high SPI1_MOSI
6 push/pull - medium TIM4_CH1
7 push/pull - medium TIM4_CH2
8 push/pull - medium TIM10_CH1
9 push/pull - high TIM11_CH1
10 push/pull - medium TIM2_CH3
12 push/pull - low - L
13 push/pull - high SPI2_SCK
14 push/pull - very high SPI2_MISO
15 push/pull - high SPI2_MOSI
C 0-5 analog - - ADC1
6 push/pull - low TIM3_CH1
7 push/pull - low TIM3_CH2
8 open drain - low - L
9 push/pull - high MCO_2
10 push/pull - very high - H
11 input - low -
12 input - low -
13 input - low -
14 input - low -
15 input - low -
D 0-15 push/pull - high - H
E 0 push/pull - medium - H
1 push/pull - medium - H
2 push/pull - high - H
3 push/pull down high - L
4 push/pull - low - L
5 push/pull - low - L
6 push/pull - medium TIM9_CH2
7 Dynamically set as output or input by main loop L
8 push/pull - high TIM1_CH1N
9 push/pull - high TIM1_CH1
10 push/pull - high TIM1_CH2N
11 push/pull - high TIM1_CH2
12 push/pull - high TIM1_CH3N
13 push/pull - high TIM1_CH3
14 push/pull - high TIM1_CH4
15 push/pull - very high - L
Clone this wiki locally