Skip to main content
Graduate
September 18, 2025
Solved

Open-drain GPIO current sink limitation

  • September 18, 2025
  • 3 replies
  • 619 views

I'm planning to connect 40 LED with a current of 20mA (total 800mA) to 40-gpio pins of STM32G4 device. The pins will be configured as Open-drain so the 20mA LED current of each pin will flow through an external resistor and the internal low-side NMOS transistor of the IC.

In this case I believe there will be no restriction about the STM32G4 power dissipation and current capabilities. This is true or am I wrong? Please could anyone clarify this?

Thanks in advance,
Gaston

    This topic has been closed for replies.
    Best answer by TDK

    No, that's way too much. The datasheet lists the maximum total drain over all GPIOs.

     

    You are limited to a max sink of 100 mA over all IO pins on the STM32G474. Similar for other chips.

    TDK_1-1758209521286.png

    3 replies

    TDKAnswer
    Super User
    September 18, 2025

    No, that's way too much. The datasheet lists the maximum total drain over all GPIOs.

     

    You are limited to a max sink of 100 mA over all IO pins on the STM32G474. Similar for other chips.

    TDK_1-1758209521286.png

    GastonAuthor
    Graduate
    September 18, 2025

    Thanks! Just out of curiosity. What's the reason for the 100mA limitation? Is it the source (GND) junction point of all the NMOS transistors? The device is STM32G431VBT6 that it has 5 GND pins around the LQFP100 package.

    Super User
    September 18, 2025

    In general:

    Bonding wires and other interconnects within a chip are sized for a specific amount of current. When that's exceeded, excessive temperatures or damage can occur. Even if you use different pins, the current from them will likely link up at some point within the chip and that's why there is a separate sum of current limitation.

    The 100 mA limitation is probably a conservative number. No doubt you could get away with more in some cases and no doubt the *real* limitation will depend upon which exact pins you're using and the path the current takes from them, through the chip, to VSS. But that's far too much detail to put into a datasheet.

    Transistors are cheap. You can also get LEDs that use much less than 20 mA of current and are still bright.

    Technical Moderator
    September 18, 2025

    Hi @Gaston 

    Additionally, as @TDK mentioned,

    You can refer to Table 55. Output Voltage Characteristics, which is found in the Datasheet.

    Depending on the voltage you will use in your application, it provides the maximum current supported for the I/O.

    ELABI1_0-1758211648452.png

    Thanks.

    ELABI.1

    Graduate
    October 24, 2025

    I don't know what your application for the LEDs is, so this comment may not be relevant, but  - if you choose high efficiency Leds with a narrow emitting angle, it is surprising how little current you can get away with.