2026-01-16 1:31 AM
Our product is battery powered and uses an STM32L072CZT6.
I did not write any of the power management code and I am not sure exactly what modes are used.
When cold started and left to go into power saving mode, the current drawn by the entire product averages 82uA.
However, after changing BOOT0, resetting, flashing the app using STM32CubeProgrammer, changing BOOT0 back, resetting again and letting the unit run until power-saving mode engages it then has an average current draw of 200uA, a 150% increase. I also discovered that re-flashing is not required; simply running the bootloader for a few seconds is enough to cause the problem, so it's not due to any code downloaded by the programmer.
There seems very little in the CPU which survives an external reset. The RCC registers look the same in each case, and the only difference in RTC registers is the change of time and next scheduled alarm.
Our console serial port is on PA2/3, there was a BlueTooth module on PA11/12 but that has been removed for testing.
PA9/10 have 4k7 external pull-ups. GPIOA registers readback all the same in each case.
Can anybody suggest any paths for investigation?
What does the bootloader configure which would survive a hard reset?
Are any pins other than PA2/3/9-12 configured which could cause other circuitry to be affected?
2026-01-16 1:41 AM
Do you use any of the analog features (ADC, DAC, COMP)?
I'd look at the FLASH, PWR and SYSCFG registers, too.
JW