
CH32V003
Reference Manual
V1.3
55
SPIx_MOSI
Full-duplex Master mode
Push-pull multiplexed output
Full-duplex Slave mode
Floating input or pull-up input
Simple bi-directional data
line/Master mode
Push-pull multiplexed output
Simple bi-directional data
line/Slave mode
Not used
SPIx_MISO
Full-duplex Master mode
Floating input or pull-up input
Full-duplex Slave mode
Push-pull multiplexed output
Simple bi-directional data
line/Master mode
Not used
Simple bi-directional data
line/Slave mode
Push-pull multiplexed output
SPIx_NSS
Hardware Master or Slave mode
Float, pull-up or pull-down input
Hardware Master mode
Push-pull multiplexed output
Software mode
Not used
Table 7-5 Internal integrated bus (I2C) module
I2C pins
Configuration
GPIO configuration
I2C_SCL
I2C clock
Open-drain multiplexed output
I2C_SDA
I2C data
Open-drain multiplexed output
Table 7-6 Analog-to-digital converters (ADCs)
ADC pin
GPIO configuration
ADC
Analog input
Table 7-7 Other I/O function settings
Pins
Configuration features
GPIO configuration
MCO
Clock output
Push-pull multiplexed output
EXTI
External interrupt input
Float, pull-up or pull-down input
OPA
Operational Amplifier Input
Floating input
7.3 Register description
7.3.1 GPIO register description
Unless otherwise specified, the registers of the GPIO must be operated as words (operate these registers with
32 bits).
Table 7-8 GPIO-related registers list
Name
Access address
Description
Reset value
R32_GPIOA_CFGLR
0x40010800
PA port configuration register low
0x44444444
R32_GPIOC_CFGLR
0x40011000
PC port configuration register low
0x44444444
R32_GPIOD_CFGLR
0x40011400
PD port configuration register low
0x44444444
R32_GPIOA_INDR
0x40010808
PA port input data register
0x0000XXXX
R32_GPIOC_INDR
0x40011008
PC port input data register
0x0000XXXX
R32_GPIOD_INDR
0x40011408
PD port input data register
0x0000XXXX
R32_GPIOA_OUTDR
0x4001080C
PA port output data register
0x00000000
R32_GPIOC_OUTDR
0x4001100C
PC port output data register
0x00000000
R32_GPIOD_OUTDR
0x4001140C
PD port output data register
0x00000000
R32_GPIOA_BSHR
0x40010810
PA port set/reset register
0x00000000
R32_GPIOC_BSHR
0x40011010
PC port set/reset register
0x00000000
R32_GPIOD_BSHR
0x40011410
PD port set/reset register
0x00000000
R32_GPIOA_BCR
0x40010814
PA port reset register
0x00000000
R32_GPIOC_BCR
0x40011014
PC port reset register
0x00000000