
GD32A50x User Manual
182
Figure 8-5. Basic structure of Alternate function configuration
Vss
V
dd
I / O pin
ESD
protect
Alternate Function Output
Alternate Function Input
Output driver
Input driver
8.3.9.
GPIO locking function
The locking mechanism allows the IO configuration to be protected.
The protected registers are GPIOx_CTL, GPIOx_OMODE, GPIOx_OSPD, GPIOx_PUD and
GPIOx_AFSELy (y=0, 1). 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.10.
GPIO single cycle toggle function
GPIO could toggle the I/O output level in single AHB cycle by writing 1 to the corresponding
bit of GPIOx_TG register. The output signal frequency could up to the half of the AHB clock.