2026-01-26 2:44 AM
I have been working on an IoT project using STMicroelectronics' STM32 microcontrollers, and I have encountered a unique challenge around power management. My system needs to run on minimal power to ensure long battery life in remote applications, but I am facing issues with inconsistent power consumption during sleep modes.
Here’s the problem:
Despite using the low-power modes like Sleep, Standby, and Stop in STM32, I am seeing unexpected power drain when the device is supposed to be in a low-power state.
I have implemented HAL libraries and checked my hardware, but I still get around 10-20mA of current draw when the microcontroller is supposed to be in the Stop mode.
Some potential solutions I have considered:
Reviewing the clock configurations to ensure the system isn't inadvertently running unnecessary peripherals.
Using the dynamic voltage scaling feature, but I'm not sure if I’m configuring it properly.
Checking for interrupt handling issues that might keep the MCU active unintentionally.
Has anyone faced similar issues with low-power consumption in STM32-based IoT designs? I would love to hear any tips, code snippets, or suggestions on improving power efficiency. Also, if there’s something I am missing in the low-power setup or configuration, please share your experiences.
Looking forward to your insights!
2026-01-26 3:26 AM
Hello,
That depends on where you are measuring the power consumption on the MCU or on the board?
Even on MCU, components connected to the MCU could leak current that gives the impression the MCU is consuming more than expected.
The current consumption values provided in the datasheet were measured with MCU isolated from any extra hardware i.e. just the minimal hardware that makes the MCU to run.
2026-01-26 4:14 AM
@robert3 wrote:Has anyone faced similar issues with low-power consumption in STM32-based IoT designs?
A quick search of the forum would reveal plenty!
As @mƎALLEm said, the big question is where is that 10-20mA actually going?
If it's not down to the MCU itself, then no amount MCU sleep mode optimisation is going to help!
In particular, remember that connecting a Debugger will cause leakage and may prevent the CPU from actually sleeping.
You may need to do a full power cycle (not just a reset) after using a debugger.
@robert3 wrote:I would love to hear any tips, code snippets, or suggestions on improving power efficiency.
What tools do you have to measure the consumption?
Being able to visualise it in real time is key.
Have you seen:
AN4777, How to optimize power consumption on STM32 MCUs
Also AN2629 specifically for F1, AN5930for H5, AN5946 for N6, etc?
@robert3 wrote:Also, if there’s something I am missing in the low-power setup or configuration, please share your experiences.
We know nothing about what you have done - so hard to say what you've missed!