
GD32F403xx User Manual
139
Figure 8-5. Alternate function configuration
Vss
Output
Control
Vdd
Alternate Function Output
Alternate Function Input
Input driver
Output driver
I/O pin
Schmitt
trigger
ESD
protection
Vdd
Vss
8.3.8.
GPIO locking function
The locking mechanism allows the IO configuration to be protected.
The protected registers are GPIOx_CTL0, GPIOx_CTL1. It allows the I/O configuration to be
frozen by the 32-bit locking register (GPIOx_LOCK). When the special LOCK sequence has
occurred on LKK bit in GPIOx_LOCK register and the LKy bit is set in GPIOx_LOCK register,
the corresponding port is locked and the corresponding port configuration cannot be modified
until the next reset. It recommended to be used in the configuration of driving a power module.
8.3.9.
GPIO I/O compensation cell
If the I/O port output speed need more than 50MHz, it is recommended to use the
compensation cell for slew rate control to reduce the I/O noise effects on the power supply.
Compensation cell is disabled after reset, it needs to be enabled by the user. After enabling
the compensation cell, the complete flag CPS_RDY is set to indicate that the compensation
cell is ready and can be used. If the supply voltage over 2.4 V~3.6V, must disable the
compensation cell.
8.4.
Remapping function I/O and debug configuration
8.4.1.
Introduction
In order to expand the flexibility of the GPIO or the usage of peripheral functions, each I/O pin
can be configured up to four different functions by setting the AFIO port configuration register
(AFIO_PCF0/AFIO_PCF1). Suitable pinout locations can be selected using the peripheral IO
remapping function. Additionally, various GPIO pins can be selected to be the EXTI interrupt