Gpio Selection Guide And Configuration; Figure 18. Gpio Configuration Flowchart (1 Of 2) - ST STM32 Application Note

Microcontroller gpio hardware settings and low-power consumption
Hide thumbs Also See for STM32:
Table of Contents

Advertisement

GPIO selection guide and configuration

8
GPIO selection guide and configuration
The flowchart presented in
select the GPIO mode and configuration adapted to their application.
General recommendations
No floating pins
No pins driving in opposite
direction of the internal pull-up /
pull-down resistor
Is the GPIO pin connected to an
internal peripheral or to an
external hardware?
Y
Is the GPIO pin configured as a
digital GPIO?
Y
Is the GPIO pin used as a
digital input?
Y
Is the GPIO pin connected to an
external digital output?
Y
Check the external output
voltage compliance against
GPIO V
specification
in
V
+ 0.3 V < V
DDIO
Y
Is the GPIO input pin
connected to an
external push-pull
output?
Y
Only FT GPIO must be used.
Turn off the internal pull-
up / pull-down resistor
Only FT GPIO must be used.
GPIO input is connected to an
external open-drain output.
Turn off the internal pull-
up / pull-down resistor
External pull-up must be
connected
28/31
Figure 18

Figure 18. GPIO configuration flowchart (1 of 2)

N
N
N
N
A
N
< 5.5 V ?
in
Check the external output
voltage compliance against
GPIO V
V
SS
N
Is the GPIO input pin
TC, TT, or FT GPIO can be
used.
Turn off pull-up / pull-
down resistor
TC, TT, or FT GPIO can be
used.
GPIO input pin is connected to
an external open- drain output.
Enable pull-up / pull-down
resistor
and
Figure 19
provides users with a quick help to
C
B
specification
in
< V
< V
+ 0.3 V ?
in
DDIO
Y
connected to an
external push-pull
output?
Y
AN4899 Rev 3
Pin is floating.
To reduce power consumption, set
the pin as a push-pull output and
drive it in the same direction as the
internal pull-up / pull-down resistor.
Alternately, set pin as analog input.
N
Check the external output
voltage compliance against
GPIO V
specification
in
V
- 0.3 V < V
< V
N
SS
in
Y
TC, TT, or FT GPIO can be used.
Enable pull-up / pull-down
resistor
Limit the negative injected
current to -5 mA
Input stage must be adapted.
Input level is higher than the
specified V
max. The injected
in
current (I
) and the input voltage
INJ
(V
) must be limited to the specified
in
values given in the datasheet.
AN4899
N
?
SS
MSv46889V1

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32 and is the answer not in the manual?

Table of Contents