General-purpose I/Os (GPIO)
RM0365
171/1080
DocID025202 Rev 7
for the register boundary addresses.
0x0C
GPIOB_PUPDR
P
U
PDR15[
1:
0]
P
U
PDR14[
1:
0]
P
U
PDR13[
1:
0]
P
U
PDR12[
1:
0]
PUP
D
R
11
[1:
0]
P
U
PDR10[
1:
0]
PUP
D
R9
[1:
0
]
PUP
D
R8
[1:
0
]
PUP
D
R7
[1:
0
]
PUP
D
R6
[1:
0
]
PUP
D
R5
[1:
0
]
PUP
D
R4
[1:
0
]
PUP
D
R3
[1:
0
]
PUP
D
R2
[1:
0
]
PUP
D
R1
[1:
0
]
PUP
D
R0
[1:
0
]
Reset value
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0x10
GPIOx_IDR
(where x =
A..F
)
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
IDR15
IDR14
IDR13
IDR12
ID
R1
1
IDR10
IDR9
IDR8
IDR7
IDR6
IDR5
IDR4
IDR3
IDR2
IDR1
IDR0
Reset value
x
x
x x
x
x
x
x
x
x x
x
x
x x
x
0x14
GPIOx_ODR
(where x =
A..F
)
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
ODR15
ODR14
ODR13
ODR12
ODR1
1
ODR10
ODR9
ODR8
ODR7
ODR6
ODR5
ODR4
ODR3
ODR2
ODR1
ODR0
Reset value
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x18
GPIOx_BSRR
(where x =
A..F
)
BR
1
5
BR
1
4
BR
1
3
BR
1
2
BR1
1
BR
1
0
BR9
BR8
BR7
BR6
BR5
BR4
BR3
BR2
BR1
BR0
BS
1
5
BS
1
4
BS
1
3
BS
1
2
BS
11
BS
1
0
BS9
BS8
BS7
BS6
BS5
BS4
BS3
BS2
BS1
BS0
Reset value
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x1C
GPIOx_LCKR
(where x = see
(1)
)
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
LC
K
K
LC
K1
5
LC
K1
4
LC
K1
3
LC
K1
2
LCK1
1
LC
K1
0
LCK9
LCK8
LCK7
LCK6
LCK5
LCK4
LCK3
LCK2
LCK1
LCK0
Reset value
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x20
GPIOx_AFRL
(where x =
A..F
)
AFRLAFR7[3:
0]
AFRLAFR6[3:
0]
AFRLAFR5[3:
0]
AFRLAFR4[3:
0]
AFRLAFR3[3
:0]
AFRLAFR2[3:
0]
AFRLAFR1[3
:0]
AFRLAFR0[3
:0]
Reset value
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0x24
GPIOx_AFRH
(where x =
A..F
)
AFRHAFR15[
3:0]
AFRHAFR14[
3:0]
AFRHAFR13[
3:0]
AFRHAFR12[
3:0]
AFRHAFR11[
3:0]
AFRHAFR10[
3:0]
AFRHAFR9[3
:0]
AFRHAFR8[3
:0]
Reset value
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1. A, B and D in STM32F302xB/C, A, B, C, D and F in STM32F302x6/8.
Table 31. GPIO register map and reset values (continued)
Offset
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0