GD32A50x User Manual
180
8.3.5.
Input configuration
When GPIO pin is configured as input:
The schmitt trigger input is enabled.
The weak pull-up and pull-down resistors could be chosen.
Every AHB clock cycle the data present on the I/O pin is got to the port input status
register.
The output buffer is disabled.
Figure 8-2. Basic structure of Input configuration
shows the input configuration.
Figure 8-2. Basic structure of Input configuration
Alternate Function Input
Vss
V
dd
I / O pin
ESD
protect
Read
Input
Status
Register
Input driver
8.3.6.
Output configuration
When GPIO pin is configured as output:
The schmitt trigger input is enabled.
The weak pull-up and pull-down resistors could be chosen.
The output buffer is enabled.
Open Drain Mode: The pad output low level when a “0” in the output control register;
while the pad leaves Hi-
Z when a “1” in the output control register.
Push-
Pull Mode: The pad output low level when a “0” in the output control register; while
the pad out
put high level when a “1” in the output control register.
A read access to the port output control register gets the last written value.
A read access to the port input status register gets the I/O state.
Figure 8-3. Basic structure of Output configuration
shows the output configuration.
Figure 8-3. Basic structure of Output configuration
Output
Control
Register
Write
Read/Write
Alternate Function Output
Registers
Bit Operate
Vss
V
dd
I / O pin
ESD
protect
Output driver