Skip to main content
Associate II
September 12, 2026
Question

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

  • September 12, 2026
  • 2 replies
  • 14 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

2 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 II
September 12, 2026

ohh i will check it