1.8uA at open state and 20 uA at closed for a few seconds
This commit is contained in:
parent
7adb1031ee
commit
1140aa9a19
|
@ -96,7 +96,8 @@ void PWR_EnterStopMode(void)
|
||||||
/* USER CODE END EnterStopMode_1 */
|
/* USER CODE END EnterStopMode_1 */
|
||||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET);
|
||||||
//HAL_GPIO_WritePin(GPIOC, 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(GPIOA, GPIO_PIN_All, GPIO_PIN_RESET);
|
||||||
|
HAL_GPIO_DeInit(GPIOA,GPIO_PIN_0);
|
||||||
HAL_SuspendTick();
|
HAL_SuspendTick();
|
||||||
/* Clear Status Flag before entering STOP/STANDBY Mode */
|
/* Clear Status Flag before entering STOP/STANDBY Mode */
|
||||||
LL_PWR_ClearFlag_C1STOP_C1STB();
|
LL_PWR_ClearFlag_C1STOP_C1STB();
|
||||||
|
@ -123,6 +124,7 @@ void PWR_ExitStopMode(void)
|
||||||
SRAM ctrls, DMAx, DMAMux, AES, RNG, HSEM */
|
SRAM ctrls, DMAx, DMAMux, AES, RNG, HSEM */
|
||||||
|
|
||||||
/* Resume not retained USARTx and DMA */
|
/* Resume not retained USARTx and DMA */
|
||||||
|
MX_GPIO_Init();
|
||||||
vcom_Resume();
|
vcom_Resume();
|
||||||
/* USER CODE BEGIN ExitStopMode_2 */
|
/* USER CODE BEGIN ExitStopMode_2 */
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "flash_if.h"
|
#include "flash_if.h"
|
||||||
|
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "gpio.h"
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* External variables ---------------------------------------------------------*/
|
/* External variables ---------------------------------------------------------*/
|
||||||
|
@ -700,9 +700,10 @@ static void OnTxTimerEvent(void *context)
|
||||||
UTIL_TIMER_Start(&TxTimer);
|
UTIL_TIMER_Start(&TxTimer);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
MX_GPIO_Init();
|
||||||
door_status = HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0);
|
door_status = HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0);
|
||||||
door_changed_flag = 0;
|
//door_changed_flag = 0;
|
||||||
if (door_status != door_previous_status)
|
//if (door_status != door_previous_status)
|
||||||
{
|
{
|
||||||
door_previous_status = door_status;
|
door_previous_status = door_status;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue