From 76eec8577a0d4ef038484765609d2032e9d3315e Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Wed, 3 Jul 2024 13:28:22 +0800 Subject: [PATCH] --- park here for low power CR2450 2.5V --- Core/Src/stm32_lpm_if.c | 5 +++-- readme.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/Src/stm32_lpm_if.c b/Core/Src/stm32_lpm_if.c index 93dfd71..c795619 100644 --- a/Core/Src/stm32_lpm_if.c +++ b/Core/Src/stm32_lpm_if.c @@ -95,13 +95,14 @@ void PWR_ExitOffMode(void) void PWR_EnterStopMode(void) { /* USER CODE BEGIN EnterStopMode_1 */ -#if 0 +#if 1 HAL_UART_DeInit(&huart2); vcom_DeInit(); HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All); HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All); HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All); #endif +#if 0 __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE(); @@ -111,7 +112,7 @@ void PWR_EnterStopMode(void) __HAL_RCC_GPIOA_CLK_DISABLE(); __HAL_RCC_GPIOB_CLK_DISABLE(); __HAL_RCC_GPIOC_CLK_DISABLE(); - +#endif //HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All, GPIO_PIN_RESET); //HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET); diff --git a/readme.txt b/readme.txt index 7116f5d..10b5109 100644 --- a/readme.txt +++ b/readme.txt @@ -45,4 +45,5 @@ Pre-defines 2024-05-24 GOOD R1D with higher power consumption at 30uA 2024-05-28 GOOD R1D with lower power and TPS shutdown to 0V, yet, TOF range data incorrect. or not ranging at all 2024-05-28 range distance same 1000mm + 2024-07-03 GPIO analog cannot be RESET in enterStopMode...only deinit ******************************************************************************