Pull-Up Calculation; Figure 5. Stm32 Current Flow According To Output Voltage Level - ST STM32 Application Note

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

Advertisement

GPIO electrical characteristics and definitions
5.1.5

Pull-up calculation

Each STM32 GPIO offers the possibility to select internal pull-up and pull-down (typical
value = 40 kOhm). Some STM32 applications may require to use an external pull-up
resistor. This section presents output and input levels compatibility and the way to calculate
the appropriate pull-up resistor when the STM32 GPIO open-drain output is connected to an
external device.

Figure 5. STM32 current flow according to output voltage level

STM32
GPIO = 0
I
OL
(ON)
V
OLmax
GPIO output = 0
The schematics in
voltages needed to calculate the R
The value of R
transistor is OFF; the V
The value of R
transistor is ON; the V
Pull-up calculation for the I
Pull-up calculation in case of I
account. This calculation depends on the I
Plus), on the V
A low pull-up resistor value prevents the dedicated STM32 GPIO I
level on the bus. The minimum value R
according to
Equation 2
The maximum pull-up resistance R
including the capacitance of the wire, connections and pins (C
(t
) of the SDA and SCL signals. Refer to the datasheet and to the I
rmax
for more details.
16/31
V
DD
R
PU
External
I
p
device
I
lkg
input
V
ILmax
Figure 5
shows the current flows (gray arrows) and the associated
is maximum when GPIO output equals 1. This means that the NMOS
PU
voltage is used for the calculation.
OHmin
is minimum when GPIO output equals 0. This means that the NMOS
PU
voltage is used for the calculation.
OLmax
(V
- V
) / (I
DDmax
OLmax
2
2
C bus is different because the I
of the device, and on the bus capacitance.
DD
Equation
2.
R
= (V
PUmin
DD
STM32
GPIO = 1
(OFF)
pull-up resistor.
PU
+ I
) < R
< (V
OL
PU
DDmin
lkg
C bus:
2
C mode (Standard Mode, Fast Mode, Fast mode
is defined as a function of V
PUmin
- V
) / I
OLmax
OL
is limited by the total capacitance of the bus
PUmax
AN4899 Rev 3
V
DD
R
PU
I
p
I
I
lkg
IHmax
V
OHmin
V
IHmin
GPIO output = 1
- V
) / (I
+ I
OHmin
IH
2
C mode must be taken into
2
C pins to generate a low
, V
DD
), and the maximum rise time
b
2
C bus specification
AN4899
External
device
input
MSv46876V1
)
lkg
, and I
OL
OL

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?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents