From 6a94129ad6161a5fa1eb178feedd596a748efccc Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Thu, 14 Mar 2024 13:00:26 +0800 Subject: [PATCH] TRY STANDBY CLEAR FLAG --- Core/Src/stm32_lpm_if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Src/stm32_lpm_if.c b/Core/Src/stm32_lpm_if.c index a04384d..29e070b 100644 --- a/Core/Src/stm32_lpm_if.c +++ b/Core/Src/stm32_lpm_if.c @@ -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