2025-05-13 7:44 AM - edited 2025-05-13 7:53 AM
I have a Nucleo 32 board with STM32L432KC. I am using Power Profiler Kit II to measure the power consumption. I connected PPK Vout to Nucleo's 5V (pin 4 on CN4), GND to GND and the PPK is set as a source meter.
Program on MCU is running for 2s in RUN mode (80 MHz, LED on) and then for 2s in STOP 2 mode (LED off).
Code to enter the STOP 2 mode:
HAL_SuspendTick();
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
RTC and GPIO are used to wake up:
if(HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x02000, RTC_WAKEUPCLOCK_RTCCLK_DIV16) != HAL_OK)
{
printf("Error setting RTC wakeup timer\n");
Error_Handler();
}
else
{
printf("RTC wakeup timer set\n");
}
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
UNUSED(GPIO_Pin);
if(GPIO_Pin == GPIO_PIN_12)
{
SystemClock_Config();
HAL_ResumeTick();
}
}
void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc)
{
UNUSED(hrtc);
SystemClock_Config();
HAL_ResumeTick();
}
On top of that the RTC Calendar is used to get the hour:
HAL_RTC_GetTime(&hrtc, &time, RTC_FORMAT_BIN);
HAL_RTC_GetDate(&hrtc, &date, RTC_FORMAT_BIN);
wakeup_current_time = time.Minutes * 60 + time.Seconds;
PPK shows that the power consumption for RUN mode is 12,8 mA, which I think is ok. However the power consumption for STOP 2 mode is 2,6 mA which is very high. According to the spec it should be 1,4 uA. Why is it like that? What am I missing?
Solved! Go to Solution.
2025-05-13 8:08 AM
All connections - SWD, NRST, etc.
See the schematics, and check for anything else which might be "leaking" current.
2025-05-13 7:54 AM
@DPiór.1 wrote:I am using Power Profiler Kit II
You mean the Nordic Semi Power Profiler: https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2 ?
As this is ST's forum, best not to assume that people will automatically know what that is!
@DPiór.1 wrote:I connected PPK Vout to Nucleo's 5V (pin 4 on CN4)
Have you made sure to disconnect all connections to the ST-Link?
2025-05-13 8:03 AM
Hi @Andrew Neil
Yes, I mean the Nordic Power Profiler Kit II.
About which connections to ST-Link are you talking about?
2025-05-13 8:08 AM
All connections - SWD, NRST, etc.
See the schematics, and check for anything else which might be "leaking" current.
2025-05-14 7:49 AM
Thanks for the hints @Andrew Neil
I removed SB14, if I understand the schematics correctly, this causes that ST-Link and power LED are not powered now. PPK Vout is connected now to 3V (pin 14 on CN4). The results are much better: power consumption in RUN mode is 9,16 mA and in STOP 2 mode ~21 uA (with peaks over 200uA, see attached image). Still the power consumption for STOP 2 mode seems to be too big. Any suggestions what else can be causing this? I don't see anything else on the schematics that could cause current leak.
I plan to remove SB2 and SB3 to disconnect VCP to ST-Link, but I don't think that this will change anything.
2025-05-14 8:08 AM
You'll need more than just one disconnection - there's probably at least 4 connections: SWDIO, SWCLK, NRST, MCO ...
2025-05-14 8:25 AM
NRST I already disconnected before. I don't see any option on the board to disconnect SWDIO, SWCLK, MCO.
I removed SB2 and SB3 and the power consumption in STOP 2 mode is higher - ~50 uA
P.S.
Power consumption for RUN mode is slightly lower than in the specification :)
2025-05-14 8:46 AM
Anyway after removing SB14 the power consumption dropped from 2,6 mA to ~21 uA. This means that indeed the problem was on the board - other components were consuming the current. Thank you @Andrew Neil for the guidance.
At the moment 21 uA is good enough for me, I will not continue investigating this.
I just wonder why after removing SB2 and SB3 the power consumption increase 2x...