Skip to main content
Associate III
August 2, 2023
Question

low power modes

  • August 2, 2023
  • 0 replies
  • 1242 views

this part in my code completely making my prototype to sleep which should not.As my standby should workout if the main power supply is OFF for 30 seconds.

I have tried shutdown mode and exti thats too behaved the same

Please help what may be wrong

 

 __HAL_RCC_PWR_CLK_ENABLE();
 /* Check if the system was resumed from Standby mode */
 if (__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET)
 {
 /* Clear Standby flag */
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
 /* Check and Clear the Wakeup flag */
 if (__HAL_PWR_GET_FLAG(PWR_FLAG_WUF4) != RESET)
 {
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF4);
 }
 }

 HAL_Delay(30000);
 

 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN4_HIGH);

 HAL_PWR_EnterSTANDBYMode();

 

This topic has been closed for replies.