DocID025202 Rev 7
170/1080
RM0365
General-purpose I/Os (GPIO)
171
10.4.12 GPIO register map
The following table gives the GPIO register map and reset values.
Table 31. GPIO register map and reset values
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
0x00
GPIOA_MODER
MODE
R15[
1:0
]
MODE
R14[
1:0
]
MODE
R13[
1:0
]
MODE
R12[
1:0
]
MODER1
1[
1:
0]
MODE
R10[
1:0
]
MODER9[1:0]
MODER8[1:0]
MODER7[1:0]
MODER6[1:0]
MODER5[1:0]
MODER4[1:0]
MODER3[1:0]
MODER2[1:0]
MODER1[1:0]
MODER0[1:0]
Reset value
1 0 1 0 1 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
0x00
GPIOB_MODER
MODER15
[1
:0]
MODER14
[1
:0]
MODER13
[1
:0]
MODER12
[1
:0]
MODER1
1[1:0
]
MODER10
[1
:0]
MODER9[1:0]
MODER8[1:0]
MODER7[1:0]
MODER6[1:0]
MODER5[1:0]
MODER4[1:0]
MODER3[1:0]
MODER2[1:0]
MODER1[1:0]
MODER0[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 1 0 1 0 0 0 0 0 0 0
0x00
GPIOx_MODER
(where x =
C..F
)
MO
DER15[
1:
0]
MO
DER14[
1:
0]
MO
DER13[
1:
0]
MO
DER12[
1:
0]
M
O
D
E
R
11[
1:
0
]
MO
DER10[
1:
0]
MODE
R9[1
:0
]
MODE
R8[1
:0
]
MODE
R7[1
:0
]
MODE
R6[1
:0
]
MODE
R5[1
:0
]
MODE
R4[1
:0
]
MODE
R3[1
:0
]
MODE
R2[1
:0
]
MODE
R1[1
:0
]
MODE
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 0 0 0 0 0 0 0 0 0
0x04
GPIOx_OTYPER
(where x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