2025-09-25 9:36 PM
Hello,
I am working on STM32WB5MM custom hardware and trying to implement deep sleep mode using RTC wakeup interrupt.
MCU should stay active for ~30 seconds after reset.
Then enter deep sleep / STOP2 mode.
Wake up automatically every 30 seconds using RTC wakeup timer interrupt.
Expected current in STOP2 / Standby mode = < 1 mA (microamp level).
In normal running mode, MCU current ≈ 30 mA (okay).
When I put MCU into STOP2 mode, it still consumes ≈ 20 mA, instead of going down to microamps.
I am not sure if MCU is really entering STOP2/Standby or staying partially active.
while (1)
{
HAL_Delay(30000);
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 30, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);
HAL_SuspendTick();
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
SystemClock_Config();
HAL_ResumeTick();
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
if (wakeupFlag == 1)
{
wakeupFlag = 0;
// Do something on wakeup
}
}
Is this the correct way to put STM32WB5MM into deep sleep (STOP2) with RTC wakeup?
Why is the current still ~20 mA instead of microamps?
Do I need to disable any peripherals/clocks (e.g., HSI, HSE, GPIO, debug, etc.) before STOP2?
Any hardware considerations for STM32WB5MM to achieve low-power STOP2?