Skip to main content
Associate III
Apr 14, 2025 7:39 AM UTC
Question

STM32L496 Sleep & Wakeup

Split from:

https://community.st.com/t5/stm32-mcus-products/is-is-possible-to-wakeup-the-stm32l496-with-an-external/td-p/741267

as this is a new question.


Hello @STTwo-32 as the wake up pin associated with stm32L496 is SYSWKUP2 can i use this and on clicking the B1 (i.e. on board button) kindly let me know will the system gets woken up,  also i cannot able to make my system to sleep mode even after using the HAL_EnableSLEEPmode(); function, i also tried using __RCC_HAL_DISABLE_A_PORT(not sure if it exactly matches with HAL macros) for disabling clock individually to every port of the board still it is not going to sleep mode. 

Abhiram_12_0-1744616362065.pngAbhiram_12_1-1744616380305.png

 

This topic has been closed for replies.

3 replies

ST Employee
Jul 18, 2025 2:30 PM UTC

Hello @Abhiram_12, 

Before going to sleep mode, ensure that the WUF2 flag in the power status register is cleared

You can also check this Wiki that covers all low power modes entry/exit using an STM32L4: Getting started with PWR

 

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.
Associate III
Aug 11, 2025 11:01 AM UTC

@Sarra.S Sure!!, will try it and let you know.

Karl Yamashita
Principal
Jul 19, 2025 1:11 AM UTC

In Sleep mode, any interrupt will wake it up. That includes the SysTick.

 

void EnterSleepMode(void)
{
	HAL_SuspendTick();

	HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);

	HAL_ResumeTick();
}

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source