![ARTERY AT32F421 GPIO User Manual Download Page 6](http://html1.mh-extra.com/html/artery/at32f421-gpio/at32f421-gpio_user-manual_2977597006.webp)
AT32F421 GPIO user guide
2020.07.30
6
Rev.1.0.0
GPIO
During and just after reset, the alternate functions are not active and most I/O ports are configured
in input floating mode.
When configured as output, the value written to the output data register (GPIOx_OPTDT) is output
on the I/O pin. It is possible to use the output driver in push-pull mode or open-drain mode (only low
level is activated while the high level shows high impedance)
The input data register (GPIOx_IPTDT) captures the data present on the I/O pin at every AHB clock
cycle.
All GPIO pins have an internal weak pull-up and weak pull-down, which can be activated or not,
depending on the value of the GPIOx_PUPDR register.
Figure 1. Basic structure of I/O port bit