Port Configuration Register Low (Gpiox_Cfglr); Port Input Register (Gpiox_Indr) - WCH CH32V003 Series Reference Manual

Table of Contents

Advertisement

CH32V003 Reference Manual
R32_GPIOD_BCR
R32_GPIOA_LCKR
R32_GPIOC_LCKR
R32_GPIOD_LCKR
7.3.1.1 Port configuration register low (GPIOx_CFGLR) (x=A/C/D)
Offset address: 0x00
31
30
29
28
CNF7[1:0] MODE7[1:0] CNF6[1:0]
15
14
13
12
CNF3[1:0] MODE3[1:0] CNF2[1:0]
Bit
Name
[31:30]
[27:26]
[23:22]
[19:18]
CNFy
[15:14]
[11:10]
[7:6]
[3:2]
[29:28]
[25:24]
[21:20]
[17:16]
MODEy
[13:12]
[9:8]
[5:4]
[1:0]
7.3.1.2 Port input Register (GPIOx_INDR) (x=A/C/D)
Offset address: 0x08
31
30
29
28
15
14
13
12
Reserved
Bit
Name
[31:8]
Reserved
[7:0]
IDRy
V1.3
0x40011414
PD port reset register
0x40010818
PA port configuration lock register
0x40011018
PC port configuration lock register
0x40011418
PD port configuration lock register
27
26
25
24
MODE6[1:0
]
11
10
9
8
MODE2[1:0
]
Access
(y=0-7), the configuration bits for port x, by which
the corresponding port is configured.
When in input mode (MODE=00b).
00: Analog input mode.
01: Floating input mode.
10: With pull-up and pull-down mode.
RW
11: Reserved.
In output mode (MODE>00b).
00: Universal push-pull output mode.
01: Universal open-drain output mode.
10: Multiplexed function push-pull output mode.
11: Multiplexing function open-drain output
mode.
(y=0-7), port x mode selection, configure the
corresponding port by these bits.
00: Input mode.
RW
01: Output mode, maximum speed 10MHz;
10: Output mode, maximum speed 2MHz.
11: Output mode, maximum speed 50MHz.
27
26
25
24
Reserved
11
10
9
8
Access
RO
Reserved
(y=0-7), the port input data. These bits are read-
only and can only be read out in 16-bit form. The
RO
value read is the high and low state of the
corresponding bit.
23
22
21
20
MODE5[1:0
CNF5[1:0]
]
7
6
5
MODE1[1:0
CNF1[1:0]
]
Description
23
22
21
7
6
5
IDR7 IDR6 IDR5 IDR4 IDR3 IDR2 IDR1 IDR0
Description
56
http://wch.cn
0x00000000
0x00000000
0x00000000
0x00000000
19
18
17
CNF4[1:0] MODE4[1:0]
4
3
2
1
CNF0[1:0] MODE0[1:0]
Reset value
01b
0
20
19
18
17
4
3
2
1
Reset value
0
X
16
0
16
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents