cancel
Showing results for 
Search instead for 
Did you mean: 

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

wenbang zheng
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
{
  /* 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 Venmo Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
{
  /* 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 Venmo Up vote any posts that you find helpful, it shows what's working..
wenbang zheng
Associate III

Hi Clive

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

Hi Clive

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

Hi Clive

If it is convenient, can i ask where can i find fils about HAL lib user manual, or API examples, i am an new guy in STM32, very appreciate. : )