General-purpose I/Os (GPIO) RM0402
176/1163 RM0402 Rev 6
Figure 20. Output configuration
7.3.11 Alternate function configuration
When the I/O port is programmed as alternate function:
• The output buffer can be configured as open-drain or push-pull
• The output buffer is driven by the signal coming from the peripheral (transmitter enable
and data)
• 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
Figure 21 shows the Alternate function configuration of the I/O port bit.
Figure 21. Alternate function configuration
Push-pull or
Open-drain
Output
control
V
DD
V
SS
TTL Schmitt
trigger
on
Input driver
Output driver
P-MOS
N-MOS
Input data register
Output data register
Read/write
Read
Bit set/reset registers
Write
on/off
pull
pull
on/off
V
DD
V
SS
V
SS
V
DD
protection
diode
protection
diode
down
up
I/O pin
ai15941b
Alternate function output
Alternate function input
push-pull or
open-drain
From on-chip
peripheral
To on-chip
peripheral
Output
control
V
DD
V
SS
TTL Schmitt
trigger
on
Input driver
Output driver
P-MOS
N-MOS
Input data register
Output data register
Read/write
Read
Bit set/reset registers
Write
on/off
on/off
V
DD
V
SS
V
SS
V
DD
protection
diode
protection
diode
Pull
Pull
I/O pin
down
up
ai15942b