From 221ee7928e2fe3aec6554c3b0091d1343ff3adf8 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Wed, 27 Mar 2024 14:37:36 +0800 Subject: [PATCH] revise gpio reset scope --- Core/Src/stm32_lpm_if.c | 4 ++-- Core/Src/stm32wlxx_it.c | 5 ++++- Core/Src/sys_app.c | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/Src/stm32_lpm_if.c b/Core/Src/stm32_lpm_if.c index 7ca55e6..510bc6a 100644 --- a/Core/Src/stm32_lpm_if.c +++ b/Core/Src/stm32_lpm_if.c @@ -95,8 +95,8 @@ void PWR_EnterStopMode(void) /* USER CODE END EnterStopMode_1 */ HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET); - //HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET); - HAL_GPIO_WritePin(GPIOA, ~GPIO_PIN_0, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All&~GPIO_PIN_0, GPIO_PIN_RESET); HAL_SuspendTick(); /* Clear Status Flag before entering STOP/STANDBY Mode */ diff --git a/Core/Src/stm32wlxx_it.c b/Core/Src/stm32wlxx_it.c index 66231ac..f4eaab1 100644 --- a/Core/Src/stm32wlxx_it.c +++ b/Core/Src/stm32wlxx_it.c @@ -227,7 +227,7 @@ void EXTI0_IRQHandler(void) /* USER CODE END EXTI0_IRQn 1 */ } - +#if 0 /** * @brief This function handles EXTI Line 1 Interrupt. */ @@ -241,6 +241,7 @@ void EXTI1_IRQHandler(void) /* USER CODE END EXTI1_IRQn 1 */ } +#endif /** * @brief This function handles DMA1 Channel 5 Interrupt. @@ -256,6 +257,7 @@ void DMA1_Channel5_IRQHandler(void) /* USER CODE END DMA1_Channel5_IRQn 1 */ } +#if 0 /** * @brief This function handles EXTI Lines [9:5] Interrupt. */ @@ -269,6 +271,7 @@ void EXTI9_5_IRQHandler(void) /* USER CODE END EXTI9_5_IRQn 1 */ } +#endif /** * @brief This function handles USART2 Interrupt. diff --git a/Core/Src/sys_app.c b/Core/Src/sys_app.c index aeb505e..d3dbc2e 100644 --- a/Core/Src/sys_app.c +++ b/Core/Src/sys_app.c @@ -122,6 +122,7 @@ void SystemApp_Init(void) UTIL_LPM_Init(); /* Disable Stand-by mode */ UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE); + UTIL_LPM_SetOffMode((1 << CFG_LPM_UART_TX_Id), UTIL_LPM_ENABLE); #if defined (LOW_POWER_DISABLE) && (LOW_POWER_DISABLE == 1) /* Disable Stop Mode */