GD32A50x User Manual
178
as floating (no pull-up and pull-down), pull-up or pull-down function by GPIO pull-up/pull-down
registers (GPIOx_PUD).
Table 8-1. GPIO configuration table
PAD TYPE
CTLy
OMy
PUDy
GPIO
INPUT
X
Floating
00
X
00
pull-up
01
pull-down
10
GPIO
OUTPUT
push-pull
Floating
01
0
00
pull-up
01
pull-down
10
open-drain
Floating
1
00
pull-up
01
pull-down
10
AFIO
INPUT
X
Floating
10
X
00
pull-up
01
pull-down
10
AFIO
OUTPUT
push-pull
Floating
10
0
00
pull-up
01
pull-down
10
open-drain
Floating
1
00
pull-up
01
pull-down
10
ANALOG
X
X
11
X
XX
Figure 8-1. Basic structure of a general-pupose I/O
shows the basic structure of an I/O
Port bit.
Figure 8-1. Basic structure of a general-pupose I/O
Read
Vss
Output
Control
Register
Write
Read/Write
Alternate Function Output
Alternate Function Input
Registers
Bit Operate
Analog Input/output
V
dd
Input
Status
Register
I / O pin
ESD
protect
Output driver
Input driver