2024-11-26 09:46 PM
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.
2024-11-27 08:10 AM
Hello @shwetapal02, Welcome to ST Community,
Please check this bit in the RCC_APB1SMENR1 register
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.