2026-06-05 7:41 AM - last edited on 2026-06-05 7:43 AM by mƎALLEm
I know that, for lowest power, it's recommended to switch GPIOs to analogue in.
But I require outputs to keep a defined level during low-power (STOP).
As far as an STM32F030 is concerned, is there any power consumption advantage to choose between using push-pull and open-drain (possibly with pull-up/down) ?
2026-06-05 8:57 AM
I believe that as far as power consumption (except what's drawn/pushed by the external circuitry from/to the GPIO pins in question) there's no difference between pushpull (with no pullup/pulldown), open drain (where pullup would be switched on only when output is NOT set to 0) and Input with pullup or pulldown as appropriate.
This, assuming that the nominally 40k pullup/pulldown is sufficient to supply whatever external current is to be drawn.
JW
2026-06-05 9:40 AM - edited 2026-06-05 9:41 AM
Sidekick says:
Push-Pull vs. Open-Drain in STOP Mode
While the documentation does not provide a direct comparison between push-pull and open-drain configurations in STOP mode, it emphasizes that push-pull is generally preferred for maintaining a defined output level with minimal consumption. Open-drain may be used in specific cases, but it typically requires an external pull-up resistor, which could increase power consumption depending on the resistor value and the state of the pin.
It references Tips for using STM32 low-power modes, which does say:
Perhaps in one situation where a device connected to a GPIO is still on when the GPIO is set to analog mode, this could leave the pin in floating state and cause toggling on the other device. In this situation, it may be better to leave the GPIO in a known push-pull state, which has minimal consumption to begin with. Consider all external connections when deciding which configuration is best
But gives no discussion of justification of push-pull vs open-drain or using internal pullups.
Also AN4899 GPIO software guidelines for power optimization, but that also doesn't seem to consider the choice between push-pull vs open-drain or using internal pullups.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.