GD32W51x User Manual
247
16
LKK
Lock sequence key
It can only be setted using the Lock Key Writing Sequence. And can alw ays be read.
0: GPIO_LOCK register is not locked and the port configuration is not locked.
1: GPIO_LOCK register is locked until an MCU reset.
LOCK key configuration sequence
Write 1→Write 0→Write 1→ Read 0→ Read 1
Note:
The value of LK[15:0] must hold during the LOCK Key Writing sequence
15:0
LKy
Port Lock bit y(y=0..15)
These bits are set and cleared by softw are.
0: The corresponding bit port configuration is not locked
1: The corresponding bit port configuration is locked w hen LKK bit is “1”
8.5.9.
Alternate function selected register 0 (GPIOx_AFSEL0, x=A..C)
Address offset: 0x20
Reset value: The reset value is determined by the FW AES Key bit0 and bit1 in the EFUSE.
When the bit0 is 1, the PA4/PA5/PA6/PA7/PB3/PB4 is configured as one set of QSPI port
automatically by the hardware, and when the bit1 is 1, the PA9/PA10/PA11/PA12/PC4/PC5
is configured as the other set of QSPI port automatically by the hardware as well. FW AES
Key[1:0] default value is 00. Please refer to the table
Table 8-6. GPIOx_AFSEL0 reset value
below for this register reset value.
Table 8-6. GPIOx_AFSEL0 reset value
FW AES Key[1:0]
GPIOA_AFSEL0
GPIOB_ AFSEL0
GPIOC_ AFSEL0
00
0x0000 0000
0x0000 0000
0x0000 0000
01
0x3333 0000
0x0003 3000
0x0000 0000
10
0x0000 0000
0x0000 0000
0x0033 0000
11
0x3333 0000
0x0003 3000
0x0033 0000
This register has to be accessed by word(32-bit)/half-word(16-bit)/byte(8-bit)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
SEL7[3:0]
SEL6[3:0]
SEL5[3:0]
SEL4[3:0]
rw
rw
rw
rw
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
SEL3[3:0]
SEL2[3:0]
SEL1[3:0]
SEL0[3:0]
rw
rw
rw
rw
Bits
Fields
Descriptions
31:28
SEL7[3:0]
Pin 7 alternate function selected
These bits are set and cleared by softw are.
refer to SEL0 [3:0]description