Skip to main content
Associate III
September 12, 2026
Solved

STM32L053: Unexplained power consumption jump from ~30µA to 6.0mA in STOP/LPSLEEP mode

  • September 12, 2026
  • 17 replies
  • 183 views

Hi everyone,

I'm working on a battery-powered flow meter application using the STM32L053, and I'm running into a massive, unexpected jump in power consumption.

Previously, our device was successfully hitting the 0.0xx mA (around 30µA) range while maintaining our sleep cycle and keeping the LCD on. However, our boards are now consistently drawing between 5.3mA and 6.0mA, and I am struggling to isolate the leak.

Application & Setup Details:

  • MCU: STM32L053 (64-pin)
  • Clocking: LSE is disabled. We are relying entirely on the MSI (262 kHz for run mode) and the LSI (~37 kHz) for the RTC and LCD.
  • Peripherals Active in Sleep:
    • LCD Controller: Driving a large custom 7-segment display (GTD2892B). Configured for 1/4 Duty, 1/3 Bias, running off the internal voltage source (VSEL = 0 or tied to 3.3V).
    • LPTIM1: Running asynchronously in the background on the LSI to count flow pulses via an external op-amp (MCP6042).
    • RTC: Set up with the WakeUp Timer to wake the MCU every 100ms to update the flow math and handle UI debouncing.
  • Sleep Mode: The main loop spends 99% of its time in either Low-Power Sleep (LPSLEEP) or STOP mode (with PWR_LOWPOWERREGULATOR_ON and HAL_PWREx_DisableLowPowerRunMode() handled properly before entry).

What I've already checked/fixed:

  1. PVD (Programmable Voltage Detector): I noticed this was left on and disabled it before entering STOP mode, but that only accounts for a ~2.5µA leak, nowhere near the 5mA jump.
  2. GPIOs: All unused GPIOs are parked in GPIO_MODE_ANALOG with no pull-ups/pull-downs. SWD pins are left in their default alternate function.
  3. LCD High Drive (HDEN): We were previously struggling with a "dull" LCD contrast (glass capacitance sag) and experimented with enabling High Drive (LCD_FCR_HD). I know the continuous resistor network draws more current, but I wouldn't expect a 5mA jump from this alone.
  4. Debug Modules: HAL_DBGMCU_DisableDBGSleepMode() and STOPMode are called to ensure the debugger isn't keeping the core awake.
  5. Flash: Flash is powered down during sleep (FLASH_ACR_SLEEP_PD).

My Questions:

  1. Has anyone experienced a ~5mA leak specifically related to the LCD controller on the L0 series? Does using the High Drive (HDEN) network scale up to the milliamp range on large glass?
  2. Are there any known latch-up states or internal shoot-through currents on the STM32L053 if an Alternate Function input (like my LPTIM1 pin) sits at an intermediate voltage from my external op-amp?
  3. What other internal peripherals could accidentally be left clocked on the APB1/APB2 buses that would result in exactly a ~5mA floor in STOP mode?

Any insights or debugging steps to trace this 5.3mA - 6mA draw would be highly appreciated!

Thanks in advance.

 

 

code - https://github.com/vedantjadhav304/BatterypoweredFLSTM32L

Best answer by vedantgg

Hey guys i was able to identify and fix the issue . The problem was with the stm32l0 controller , earlier i mistakenly reversed the polarity of the batteries and damage Low powered section of the controller . I was unable to to consider this case before as the rest of the functionality of the project was working except low powered functionality 

17 replies

MM..1
Super User
September 12, 2026

For testing STOP code is best toggle some free pin after stop entering. = check stay or wake.

And your code maybe wake because RTC pending IRQ isnt cleared. 

RTC WUTF = 1
      ↓
EXTI20 pending = 1
      ↓
RTC_IRQn pending v NVIC = 1

place clear it before enter stop or inside handler.

vedantggAuthor
Associate III
September 12, 2026

ohh i will check it 

MGogr.1
Senior
September 13, 2026

Can you tell what was changed in hardware/software that started this more current consumption?
Or is it only on some specific boards or all boards? 

vedantggAuthor
Associate III
September 13, 2026

I have developed a custom board 

I made a mistake by not storing working version , i added PVD and increase menu options for customization . I suspected PVD but after disabling it the problem is still there 

Associate II
September 13, 2026

 

Turn off APB/AHB clocks: Use that simple RCC_AHBENR and the RCC_APB1ENR / RCC_APB2ENR registers to disable peripheral clocks before going to sleep.

Same for reducing clock frequency right down.

vedantggAuthor
Associate III
September 13, 2026

it worked it has dropped to 2mA , but i can see the current reading pulsate between 0.020mA to 2-3mA so ig my device is sleeping and waking and sleeping and waking 

Associate II
September 13, 2026

plot on scope display on low time base to measure high time vs low time then try to minimise high time 

search registers for anything else you can turn off during sleep etc 

find way to optimise your code to do minimum possible during wake time 

 

 

ST Technical Moderator
September 17, 2026

Hello ​@rich.g.williams 
First of all
to start a correct troubleshooting

Determine whether any software or hardware modification was made between the time when the system operated correctly and the time when it started leaking. Consider any modification, including a change in an external component manufacturer or model.

If no modification was made, analyze the times when the peak in current consumption occurs. The analysis might reveal a pattern or similar conditions that trigger the issue.
waiting for your feedback
BR
Gyessine

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
vedantggAuthor
Associate III
September 17, 2026

hey , i was able to fig it out that the software is working fine but the controller was damaged by something . I soldered a new board with new stm it worked fine . Now i need to check why the stm’s are failing

Associate II
September 17, 2026

This post might give you some ideas:-  4 Volts max at 150mA max into LDO 3.3V regulator

STM MCU’s don’t really fail. Some ideas that might help:-

  1. make certain that your power supply really is 3.3V and nothing more than 4V is input to any pin
  2. make sure power supply current has a maximum limit 
  3. configure all unused GPIO to safest config usually analogue in
  4. soldering and solder bridges under IC’s
  5. static or over volts from your external sensors - you could fit ESD Zener clamps like ESDZL5-1F4

 

LCE
Principal II
September 17, 2026

> but the controller was damaged by something

There are many GPIOs going to the connector, without any protection, not even serial resistors.

And push buttons, same there, not even debouncing caps.

 

This might be no problem at all, as long you’re putting this together / using this in a completely ESD-safe environment.

vedantggAuthor
Associate III
September 18, 2026

Yeah , i agree this is just a proto i will add protection circuitry in the next revision 

LCE
Principal II
September 17, 2026

> I made a mistake by not storing working version

 

That’s a big one. Not even having a pdf?

Version control is so important, at least do it manually (like copying all files to a new folder before changing anything).

vedantggAuthor
Associate III
September 18, 2026

i do have a pdf , and version control setup for schematic design . I regret not setting it up for code , but learnt from my mistakes did add the version control yst 

vedantggAuthorBest answer
Associate III
September 25, 2026

Hey guys i was able to identify and fix the issue . The problem was with the stm32l0 controller , earlier i mistakenly reversed the polarity of the batteries and damage Low powered section of the controller . I was unable to to consider this case before as the rest of the functionality of the project was working except low powered functionality