TRY STANDBY CLEAR FLAG

This commit is contained in:
Yunhorn 2024-03-14 13:00:26 +08:00
parent 17d9afd146
commit 6a94129ad6
1 changed files with 3 additions and 1 deletions

View File

@ -84,8 +84,10 @@ void PWR_EnterOffMode(void)
//HAL_GPIO_WritePin(GPIOB, GPIO_PIN_2, GPIO_PIN_RESET); /* LED OFF */
HAL_SuspendTick();
HAL_UART_DeInit(&huart2);
LL_PWR_ClearFlag_WU();
//LL_PWR_ClearFlag_WU();
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
//LL_PWR_ClearFlag_WU();
HAL_PWR_EnterSTANDBYMode();
#endif