2025-04-27 9:13 AM - edited 2025-04-28 2:40 AM
Hello,
I have a PCB with just an SWD connector and an STM32L053R8T6 populated.
I'm running example code to measure standby and stop currents. For standby, I'm reading 0.5 uA, which is within the limits given in the datasheet.
I am not getting the expected results in STOP mode: the current is ~14 uA instead of the expected <1 uA.
The code I am using is from PWR/PWR_STOP/Src/main.c (attached), where it just enters STOP mode after a 2s delay. I have not configured any wake up sources.
The current measurements are shown below. One thing to notice is that some peripheral seems to be waking up every 2 minutes. I ruled out the system tick and the watchdog. The debugger is not attached to the connector when collecting these measurements.
Below are the same measurements taken after changing the code as:
- HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE);
+ HAL_PWR_EnterSTANDBYMode();
In standby mode the average current drops to 0.42 uA and there are no periodic wake ups.
I have looked at this great post on low power modes and I think I'm addressing all the potential errors it describes.
Can anyone suggest what could be the cause for the excess consumption? Or whether this periodic wake up is normal/expected?
Thank you!
2025-04-30 9:26 AM
Hello @JCard.3,
Could you try and run this example on your board and calculate the power consumption: STM32CubeL0/Projects/NUCLEO-L053R8/Examples/PWR/PWR_STANDBY
We need to be sure it's not PCB related at first!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-01 8:26 AM - edited 2025-05-01 8:26 AM
Hi @Sarra.S ,
Thanks for following up. I had already tried essentially the same thing:
- HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE);
+ HAL_PWR_EnterSTANDBYMode();
This time, however, instead of modifying the STOP example, I did as you suggest and run the STANDBY example: `STM32Cube_FW_L0_V1.12.3/Projects/NUCLEO-L053R8/Examples/PWR/PWR_STANDBY`. The current draw is the same as my previous experiment, ~0.40 uA
It does not look like a PCB issue, given this result, and the fact that the PCB is bare except for the MCU.
Do you have any other suggestions?
Thanks!
Javier
2025-05-06 2:21 AM
Hello again,
Thank you for doing the test, when measuring, are you isolating the current of the MCU?
Also, In your main.c I don't see any other active peripherals, could you share the zipped project to test it on my side on a Nucleo-L053.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-06 4:31 AM
Hi @Sarra.S
Thanks for your offer to run the project on your Nucleo-L053!
I do not have an Nucleo-L053, but I did try it on my Nucleo-L073. Unfortunately, that board seems to have a problem with USB 5V leaking into the target MCU. When I remove the LDD jumper, the MCU continues to operate so I cannot get valid current measurements.
I have attached the project. If left the two configurations that I tested in the code. Just comment out one or the other.
// 14 uA - avg, with spikes every 2 minutes
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE);
// 0.42 uA - avg, no spikes
// HAL_PWR_EnterSTANDBYMode();
Hopefully your experiment confirms that there is nothing wrong with the code, and that the problem must be with my board. At this point I've almost convinced myself that my problem has to do with the absence of decoupling capacitors on my bare board. Could capacitors (or their absence) have have such an impact in STOP mode consumption?
Looking forward to seeing your numbers!
Thank you,
Javier
2025-05-12 1:35 PM
2025-05-13 1:58 AM
Did you disconnect the debugger and do a power cycle before measuring ?
2025-05-13 2:02 AM
Yes I did. I measure power at the debug connector, so disconnecting the debugger and cycling the power is required to measure power.
Thanks!
Javier