General-purpose I/Os (GPIO) RM0033
146/1381 RM0033 Rev 9
Figure 15. Input floating/pull up/pull down configurations
6.3.10 Output configuration
When the I/O port is programmed as output:
• The output buffer is enabled:
– Open drain mode: A “0” in the Output register activates the N-MOS whereas a “1”
in the Output register leaves the port in Hi-Z (the P-MOS is never activated)
– Push-pull mode: A “0” in the Output register activates the N-MOS whereas a “1” in
the Output register activates the P-MOS
• The Schmitt trigger input is activated
• The weak pull-up and pull-down resistors are activated or not depending on the value
in the GPIOx_PUPDR register
• The data present on the I/O pin are sampled into the input data register every AHB1
clock cycle
• A read access to the input data register gets the I/O state
• A read access to the output data register gets the last written value
Figure 16 shows the output configuration of the I/O port bit.
on/off
pull
pull
on/off
I/O pin
V
DD
V
SS
TTL Schmitt
trigger
V
SS
V
DD
protection
diode
protection
diode
on
input driver
output driver
down
up
Input data register
Output data register
Read/write
Read
Bit set/reset registers
Write
ai15940b