Analog Input Configuration; Gpio Settings For Peripherals - WCH CH32V003 Series Reference Manual

Table of Contents

Advertisement

CH32V003 Reference Manual

7.2.9 Analog input configuration

Figure 7-5 The configuration structure when the GPIO module is used as an analog input
To on-chip
Analog Input
peripheral
Read
Bit set/reset
Write
registers
Read/write
When the analog input is enabled, the output buffer is disconnected, the input of the Schmitt trigger in the
input driver is disabled to prevent the generation of consumption on the I/O port, the pull-up and pull-down
resistors are disabled, and the read input data register will always be 0.

7.2.10 GPIO settings for peripherals

The following table recommends the corresponding GPIO port configuration for each peripheral pin.
TIM1 pins
TIM1_CHx
TIM1_CHxN
TIM1_BKIN
TIM1_ETR
TIM2 pins
TIM2_CHx
TIM2_ETR
Table 7-3 Universal synchronous asynchronous serial transceiver (USART)
USART pins
USARTx_TX
USARTx_RX
USARTx_CK
USARTx_RTS
USARTx_CTS
SPI pins
SPIx_SCK
V1.3
0
Input data
register
TTL Schmitt
trigger
Input driver
Output driver
Output data
register
Table 7-1 Advanced-control timer (TIM1)
Configuration
Input capture channel x
Output comparison channel x
Complementary output channels x
Brake input
Externally triggered clock input
Table 7-2 General-purpose timer (TIM2)
Configuration
Input capture channel x
Output comparison channel x
Externally triggered clock input
Configuration
Full-duplex mode
Half-duplex synchronous mode
Full-duplex mode
Half-duplex synchronous mode
Synchronous mode
Hardware flow control
Hardware flow control
Table 7-4 Serial peripheral interface (SPI) modules
Configuration
Master mode
Slave mode
off
Push-pull,
open-drain or
disabled
GPIO configuration
Floating input
Push-pull multiplexed output
Push-pull multiplexed output
Floating input
Floating input
GPIO configuration
Floating input
Push-pull multiplexed output
Floating input
GPIO configuration
Push-pull multiplexed outputs
Push-pull multiplexed outputs
Floating input or pull-up input
Push-pull multiplexed output
Push-pull multiplexed output
Floating input or pull-up input
GPIO configuration
Push-pull multiplexed output
Floating input
54
http://wch.cn
V
DD
Protection
diode
I/O pin
Protection
diode
V
SS
Not used

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents