Skip to main content
wenbang zheng
Associate II
May 9, 2019
Solved

STM32F429 standby mode can only enter once, can not enter anymore

  • May 9, 2019
  • 2 replies
  • 1422 views

Dear ALL

I got an problem when i use STM32F429 standby mode.

In the first time enter the standby mode it woks fine. I use PA0-WAUP pin to exit the standby mode. But, i make another try to enter the standby mode, it immediate reset。It is seems it entered the mode ok, and immediate exit from the mode. I have no ideal about it.

Here is my code to enter the standby mode

 if(uxBits & BIT_0)

  {

   UART_PutStr(UART_1,"接收到BIT0被设置的消�?�\r\n");

   

   HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);

     

   HAL_PWR_EnterSTANDBYMode();

}

BYW, i use FreeRtos, and i put the code in a Take with and EverntBit been set

This topic has been closed for replies.
Best answer by Tesla DeLorean
{
 /* Enable Power Clock */
 __HAL_RCC_PWR_CLK_ENABLE();
 
 /* Disable all used wakeup sources: Pin1(PA.0) */
 HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
 
 /* Clear all related wakeup flags */
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
 
 /* Re-enable all used wakeup sources: Pin1(PA.0) */
 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
 
 /*## Enter Standby Mode ####################################################*/
 /* Request to enter STANDBY mode */
 HAL_PWR_EnterSTANDBYMode();
}

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
May 9, 2019
{
 /* Enable Power Clock */
 __HAL_RCC_PWR_CLK_ENABLE();
 
 /* Disable all used wakeup sources: Pin1(PA.0) */
 HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
 
 /* Clear all related wakeup flags */
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
 
 /* Re-enable all used wakeup sources: Pin1(PA.0) */
 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
 
 /*## Enter Standby Mode ####################################################*/
 /* Request to enter STANDBY mode */
 HAL_PWR_EnterSTANDBYMode();
}

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
wenbang zheng
Associate II
May 9, 2019

Hi Clive

Thanks for help. the code __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); make the problom. very appreciate. : )

wenbang zheng
Associate II
May 9, 2019

Hi Clive

Thanks for help. the code __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); make the problom. very appreciate. : )