Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
108
/
631
modified.
Only when GPIOx_PLOCK.PLOCKK=1 and GPIOx_PLOCK.PLOCK[x]=1, the configurations corresponding
to GPIOx_PLOCK.PLOCK[x]=1 are locked and can not be modified.
If the lock sequence operation is wrong, then it must be redone (w1-> w0-> w1-> r0) to initiate the lock operation
again.
GPIO registers
These peripheral registers must be operated as 32-bit words.
GPIO registers overview
GPIOA base address: 0x40010800
GPIOB base address: 0x40010C00
GPIOC base address: 0x40011000
GPIOD base address: 0x40011400
Table 5-42 GPIO registers overview
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
000h
GPIOx_PMODE
P
M
OD
E
15[
1:0]
P
M
OD
E
14[
1:0]
P
M
OD
E
13[
1:0]
P
M
OD
E
12[
1:0]
P
M
OD
E
11[
1:0]
P
M
OD
E
10[
1:0]
P
M
OD
E
9[
1:0]
P
M
OD
E
8[
1:0]
P
M
OD
E
07[
1:0]
P
M
OD
E
6[
1:0]
P
M
OD
E
05[
1:0]
P
M
OD
E
4[
1:0]
P
M
OD
E
03[
1:0]
P
M
OD
E
2[
1:0]
P
M
OD
E
01[
1:0]
P
M
OD
E
0[
1:0]
Reset Value
x=A
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
x=B
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
x=C
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
x=D
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
004h
GPIOx_POTYPE
Reserved
P
OT
15
P
OT
14
P
OT
13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