General-purpose I/Os (GPIO)
RM0090
288/1731
DocID018909 Rev 11
8.4.10 GPIO
alternate
function high register (GPIOx_AFRH)
(x = A..I/J)
Address offset: 0x24
Reset value: 0x0000 0000
8.4.11
GPIO register map
The following table gives the GPIO register map and the reset values.
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
AFRH15[3:0]
AFRH14[3:0]
AFRH13[3:0]
AFRH12[3:0]
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
AFRH11[3:0]
AFRH10[3:0]
AFRH9[3:0]
AFRH8[3:0]
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
Bits 31:0
AFRHy:
Alternate function selection for port x bit y (y = 8..15)
These bits are written by software to configure alternate function I/Os
AFRHy selection:
0000: AF0
0001: AF1
0010: AF2
0011: AF3
0100: AF4
0101: AF5
0110: AF6
0111: AF7
1000: AF8
1001: AF9
1010: AF10
1011: AF11
1100: AF12
1101: AF13
1110: AF14
1111: AF15
Table 39. 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
MODER15
[1:0]
MODER14
[1:0]
MODER13
[1:0]
MODER12
[1:0]
MODER1
1[1
:0
]
MODER10
[1:0]
MO
D
E
R9[
1
:0
]
MO
D
E
R8[
1
:0
]
MO
D
E
R7[
1
:0
]
MO
D
E
R6[
1
:0
]
MO
D
E
R5[
1
:0
]
MO
D
E
R4[
1
:0
]
MO
D
E
R3[
1
:0
]
MO
D
E
R2[
1
:0
]
MO
D
E
R1[
1
:0
]
MO
D
E
R0[
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
MODE
R
15[
1:0
]
MODE
R
14[
1:0
]
MODE
R
13[
1:0
]
MODE
R
12[
1:0
]
MODER1
1[
1:
0]
MODE
R
10[
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..I/J/K)
MO
DER15[
1:
0]
MO
DER14[
1:
0]
MO
DER13[
1:
0]
MO
DER12[
1:
0]
MODE
R1
1[
1:0]
MO
DER10[
1:
0]
MODE
R
9[1
:0]
MODE
R
8[1
:0]
MODE
R
7[1
:0]
MODE
R
6[1
:0]
MODE
R
5[1
:0]
MODE
R
4[1
:0]
MODE
R
3[1
:0]
MODE
R
2[1
:0]
MODE
R
1[1
:0]
MODE
R
0[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