cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 GPIO lowest current consumption state

JRuss.4
Associate

I have a product design based upon the STM32L412. This design cares about every nA while in Standby mode.

Is there any difference in GPIO current consumption when a pin is in Analog mode

vs Input mode w/pulldown {with NO external components connected}?

I know this type of question is asked routinely but is usually centered around designers mistakenly having an external high voltage and then adding an internal pulldown which increases current draw. Or someone leaving a pin floating with no external components and Schmitt trigger is ON and allows the trigger to toggle and pull extra current.

As the electrical engineer on the project, I have discretion whether to add external components or not for my I/O’s. What I cannot find is any definitive ST statements regarding GPIO current draw and is there a lowest condition or not.

EXAMPLES:

A) No external component, GPIO set to analog mode {Schmitt trigger = OFF}

B) No external component, GPIO set to input mode with Pulldown {Schmitt trigger = ON}

C) External 40K pulldown to GND, GPIO set to input mode with no pulldown/pullup {Schmitt trigger = ON}

Of the examples above and in Standby, is there any nA differences of GPIO current contributing to overall power consumption or are they all the same?

In essence, I'm trying to know does the chip consume power (even nAs) to run the Schmitt or a

pulldown resistor when the external voltage is not changing. Knowing this answer would be VERY helpful in completing my electrical design.

Regards,

John Russell

Design Engineer

1 REPLY 1
TDK
Guru

Did you read AN4899?

https://www.st.com/resource/en/application_note/dm00315319-stm32-gpio-configuration-for-hardware-settings-and-lowpower-consumption-stmicroelectronics.pdf

Particularly the flowchart at the end. It suggests analog input or push-pull output for the lowest power state. Input mode is not a suggestion. I imagine the Schmitt trigger takes some amount of current even if the pin is pulled into a definite state.

In another section, it says to prefer analog mode to avoid Schmitt trigger consumption.

6.1 Configure unused GPIO input as analog input GPIO always have an input channel, which can be either digital or analog. If it is not necessary to read the GPIO data, prefer the configuration as analog input. This saves the consumption of the input Schmitt trigger.

If saving nA is critical to your application, I would absolutely run the test and measure the current consumption, rather than rely on whatever info you find online. It would not take particularly long.

Regardless, analog input seems like the best bet.

If you feel a post has answered your question, please click "Accept as Solution".