Question
STM32F4 unwanted wakeup PA0
Posted on June 18, 2017 at 15:07
Hi,
Using an STM32F446.
I setup PA0 to exit from standby mode.
The first time I enter StandbyMode, it works well, and I can exit from standby mode by using PA0.
But the next time entering standby mode, the STM32 automatically wakes-up from standby without any action on PA0 ( stays at 0 ).How can this be ?
The code I use for entering standby mode is :
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
PWR_BackupAccessCmd(ENABLE); RCC_BackupResetCmd(ENABLE); RCC_BackupResetCmd(DISABLE); PWR_WakeUpPinCmd(PWR_WakeUp_Pin1, DISABLE);PWR_ClearFlag(PWR_FLAG_WU);
/* Check if the StandBy flag is set */
if (PWR_GetFlagStatus(PWR_FLAG_SB) != RESET) { /* Clear StandBy flag */ PWR_ClearFlag(PWR_FLAG_SB); } PWR_WakeUpPinCmd(PWR_WakeUp_Pin1, ENABLE); PWR_EnterSTANDBYMode();Thanks for help.
Best regards,Vincent.
#stm32f4-wakeup