Gpio Module Output Configuration Structure Block Diagram; Multiplexing Function Configuration - WCH CH32V003 Series Reference Manual

Table of Contents

Advertisement

CH32V003 Reference Manual
7.2.7 Output configuration
Figure 7-3 GPIO module output configuration structure block diagram
Read
Write
Bit set/reset
registers
Read/write
When the I/O port is configured to output mode, the pair of MOS in the output driver can be configured to
push-pull or open-drain mode as needed, without using the multiplexing function. The pull-up and pull-down
resistors of the input driver are disabled, the TTL Schmitt trigger is activated, and the levels appearing on the
I/O pins will be sampled into the input data registers at each APB2 clock, so reading the input data registers
will give the I/O status, and in push-pull output mode, access to the output data registers will give the last
written value.

7.2.8 Multiplexing function configuration

Figure 7-4 The structure of GPIO module when it is multiplexed by other peripherals
To on-chip
Alternate Function Input
peripheral
Read
Bit set/reset
Write
registers
Read/write
from on-chip
Alternate Function Output
peripheral
When multiplexing is enabled, the output driver is enabled and can be configured to open-drain or push-pull
mode as desired, the Schmitt trigger is turned on, the input and output lines of the multiplexing function are
connected, but the output data registers are disconnected, and the levels appearing on the I/O pins will be
sampled into the input data registers at each APB2 clock. In open-drain mode, reading the input data register
will give the current status of the I/O port; in push-pull mode, reading the output data register will give the last
written value.
V1.3
Input data
register
TTL Schmitt
trigger
Input driver
Output driver
Output
Output data
control
register
Input data
register
TTL Schmitt
trigger
Input driver
Output driver
Output data
Output
register
control
53
on
V
DD
P-MOS
N-MOS
V
SS
Push-pull,
open-drain or
disabled
on
V
DD
P-MOS
N-MOS
V
SS
Push-pull,
open-drain or
disabled
http://wch.cn
V
DD
Protection
diode
I/O pin
Protection
diode
V
SS
V
DD
Protection
diode
I/O pin
Protection
diode
V
SS

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents