AnsweredAssumed Answered

STM32F4 unwanted wakeup PA0

Question asked by VDM on Jun 18, 2017
Latest reply on Jun 19, 2017 by VDM

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.

Outcomes