2025-09-18 8:12 AM
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
Solved! Go to Solution.
2025-09-18 8:29 AM - edited 2025-09-18 8:32 AM
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.
2025-09-18 8:29 AM - edited 2025-09-18 8:32 AM
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.
2025-09-18 9:09 AM
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.
Thanks.
ELABI.1
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-09-18 10:51 AM
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.
2025-09-18 11:32 AM - edited 2025-09-18 11:32 AM
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.