Power subsystem improvements and bug fixes (#353)

* BT: render icon statically.
* Move API HAL Power init call to api_hal_init.
* API HAL Power: replace stop2 mode with stop1 to ensure usb and lptim2 proper work.
This commit is contained in:
あく
2021-02-25 13:22:46 +03:00
committed by GitHub
parent a0db2986b5
commit 1b2c31da6f
7 changed files with 6 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ void api_hal_power_deep_sleep() {
LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0);
// Prepare deep sleep
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
LL_LPM_EnableDeepSleep();
#if defined ( __CC_ARM)

View File

@@ -5,5 +5,6 @@ void api_hal_init() {
api_hal_vcp_init();
api_hal_spi_init();
api_hal_i2c_init();
api_hal_power_init();
api_hal_light_init();
}

View File

@@ -64,7 +64,7 @@ void api_hal_power_deep_sleep() {
LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0);
// Prepare deep sleep
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
LL_LPM_EnableDeepSleep();
#if defined ( __CC_ARM)

View File

@@ -5,5 +5,6 @@ void api_hal_init() {
api_hal_vcp_init();
api_hal_spi_init();
api_hal_i2c_init();
api_hal_power_init();
api_hal_light_init();
}