cancel
Showing results for 
Search instead for 
Did you mean: 

Watchdog functionality in Sleep mode for STM32U535CET microcontroller

shwetapal02
Associate

Hello,

I am facing reset problem when I am waking up from Sleep mode. I am using WWDG in Software mode.

APB1 Frequency as 40MHz. COnfiguration of WWDG:

hwwdg.Instance = WWDG;

hwwdg.Init.Prescaler = WWDG_PRESCALER_128;

hwwdg.Init.Window = 127;

hwwdg.Init.Counter = 127;

hwwdg.Init.EWIMode = WWDG_EWI_DISABLE;

 

I am calling MX_WWDG_Init function after initialization of peripherals and functionality needed.

Then I am refreshing it in while loop of main function.

1st Tested Scenario:

While entering sleep mode I just refresh the WWDG. Then by waking up

from sleep mode by push button, I am getting reset and it's started from main function again instead of Re-init function.

2nd Tested Scenario:

While entering in sleep mode, I am refreshing WWDG first, then disabling APB1 clock and after that

when I wake up from push button I am enabling the APB1 clock. In this scenario I assumed that WWDG

clock should be stop in sleep mode and it should resume after wakeup.

When controller wakes up by pressing button, I am getting reset.

Please suggest me the setting if I am missing anything.

 

1 REPLY 1
Sarra.S
ST Employee

Hello @shwetapal02, Welcome to ST Community, 

Please check this bit in the RCC_APB1SMENR1 register

SarraS_0-1732723813359.png

 

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.