try GPIO_WritePin RESET instead of GPIO_DeInit

This commit is contained in:
Yunhorn 2024-04-13 14:58:26 +08:00
parent 0ef6d87ea5
commit d17f98d83a
4 changed files with 22789 additions and 22776 deletions

View File

@ -81,6 +81,9 @@ const struct UTIL_LPM_Driver_s UTIL_PowerDriver =
void PWR_EnterOffMode(void) void PWR_EnterOffMode(void)
{ {
/* USER CODE BEGIN EnterOffMode_1 */ /* USER CODE BEGIN EnterOffMode_1 */
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_All, GPIO_PIN_RESET); //HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All);
HAL_GPIO_WritePin(GPIOC,GPIO_PIN_All, GPIO_PIN_RESET); //HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All);
HAL_SuspendTick(); HAL_SuspendTick();
/* Enable WakeUp Pin PWR_WAKEUP_PIN1 connected to PA0 */ /* Enable WakeUp Pin PWR_WAKEUP_PIN1 connected to PA0 */
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW); HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW);
@ -119,8 +122,8 @@ void PWR_EnterStopMode(void)
HAL_UART_DeInit(&huart2); HAL_UART_DeInit(&huart2);
// HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All); // HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All);
HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All); HAL_GPIO_WritePin(GPIOB,GPIO_PIN_All, GPIO_PIN_RESET); //HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All);
HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All); HAL_GPIO_WritePin(GPIOC,GPIO_PIN_All, GPIO_PIN_RESET); //HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All);
/* USER CODE END EnterStopMode_2 */ /* USER CODE END EnterStopMode_2 */
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);

View File

@ -1,6 +1,6 @@
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:81:6:PWR_EnterOffMode 1 D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:81:6:PWR_EnterOffMode 1
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:96:6:PWR_ExitOffMode 2 D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:99:6:PWR_ExitOffMode 2
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:132:6:PWR_ExitStopMode 1 D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:135:6:PWR_ExitStopMode 1
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:109:6:PWR_EnterStopMode 1 D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:112:6:PWR_EnterStopMode 1
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:154:6:PWR_EnterSleepMode 1 D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:157:6:PWR_EnterSleepMode 1
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:170:6:PWR_ExitSleepMode 1 D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_RR_R125/Core/Src/stm32_lpm_if.c:173:6:PWR_ExitSleepMode 1

Binary file not shown.

File diff suppressed because it is too large Load Diff