cancel
Showing results for 
Search instead for 
Did you mean: 

Pin configurations in low power modes

Aaron McNeil
Associate III

In the STM32L4 Nucleo examples, all GPIO on the processor are configured for analog mode before entering stop1 or stop2 modes. In a typical application, there will be some lines that must remain either high or low as to not turn on any external circuitry. My question is, how much current consumption is saved by configuring these pins for analog mode? Is it still possible to get very low current in stop1 or stop2 (<10uA) when using GPIOs as outputs instead of analog mode?

I have a product I am working on that is drawing around 150 uA when in stop2 mode. Most of my pins are configured as analog when entering stop2 mode. However, there are some pins I am using to keep certain circuits on or off. The extra current consumption could be something in one of my external circuits that I havent found yet, but I wanted to rule out the possibility of it being due to me using GPIO outputs instead of analog mode.

3 REPLIES 3
Uwe Bonnes
Principal III

The shoot-through of an active GPIO when floating can be substantial. If some input GPIO is not at full logic level, current consumption will also increase. I don't think that active GPIO in stop mode against analog mode will be noticable in the 150 uA range you observe.

turboscrew
Senior III

It's a good idea to add pull-ups to the analog ins for the stop mode. It reduces the leakage a bit further.

Here we are sill talking about uAs. Defining a pin as digital inbput and leave it floating, eats more, because the Schmitt-trigger tends to change state. You should consult the datasheets. If my memory serves me right, there are quite good tables about current consumption in different situations.

Amel NASRI
ST Employee

Hello @Aaron McNeil​ ,

You find more hints in AN4899 (STM32 GPIO configuration for hardware settings and low-power consumption).

-Amel

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.