General-purpose I/Os (GPIO)
RM0365
161/1080
DocID025202 Rev 7
Figure 19. Input floating/pull up/pull down configurations
10.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 pull-up and pull-down resistors are activated 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 AHB
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
shows the output configuration of the I/O port bit.
ONOFF
PULL
PULL
ONOFF
)/PIN
6$$
633
44,3CHMITT
TRIGGER
633
6$$
PROTECTION
DIODE
PROTECTION
DIODE
ON
INPUTDRIVER
OUTPUTDRIVER
DOWN
UP
)NPU
TDA
TA
REGIS
TER
/U
TPU
TDA
TA
REGIS
TER
2EADWRITE
2EAD
"I
TSETRESE
TREGIS
TER
S
7RITE
AIB