RM0090
MODER(i)
[1:0]
10
00
11
1. GP = general-purpose, PP = push-pull, PU = pull-up, PD = pull-down, OD = open-drain, AF = alternate
function.
8.3.1
General-purpose I/O (GPIO)
During and just after reset, the alternate functions are not active and the I/O ports are
configured in input floating mode.
The debug pins are in AF pull-up/pull-down after reset:
•
PA15: JTDI in pull-up
•
PA14: JTCK/SWCLK in pull-down
•
PA13: JTMS/SWDAT in pull-up
•
PB4: NJTRST in pull-up
•
PB3: JTDO in floating state
When the pin is configured as output, the value written to the output data register
(GPIOx_ODR) is output on the I/O pin. It is possible to use the output driver in push-pull
mode or open-drain mode (only the N-MOS is activated when 0 is output).
The input data register (GPIOx_IDR) captures the data present on the I/O pin at every AHB1
clock cycle.
All GPIO pins have weak internal pull-up and pull-down resistors, which can be activated or
not depending on the value in the GPIOx_PUPDR register.
Table 35. Port bit configuration table
OSPEEDR(i)
OTYPER(i)
[B:A]
0
0
0
0
SPEED
[B:A]
1
1
1
1
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
DocID018909 Rev 11
(1)
PUPDR(i)
[1:0]
0
0
0
1
1
0
1
1
0
0
0
1
1
0
1
1
x
0
0
x
0
1
x
1
0
x
1
1
x
0
0
x
0
1
x
1
0
x
1
1
General-purpose I/Os (GPIO)
(continued)
I/O configuration
AF
PP
AF
PP + PU
AF
PP + PD
Reserved
AF
OD
AF
OD + PU
AF
OD + PD
Reserved
Input
Floating
Input
PU
Input
PD
Reserved (input floating)
Input/output
Analog
Reserved
271/1731
290
Need help?
Do you have a question about the STM32F405 and is the answer not in the manual?
Questions and answers