sleep power optimization
This commit is contained in:
parent
04a055b329
commit
95cac817b4
@ -77,7 +77,7 @@ void AXP192_power(pmu_power_t powerlevel) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case pmu_power_sleep:
|
case pmu_power_sleep:
|
||||||
pmu.setChgLEDMode(AXP20X_LED_BLINK_1HZ);
|
pmu.setChgLEDMode(AXP20X_LED_OFF);
|
||||||
// we don't cut off DCDC1, because then display blocks i2c bus
|
// we don't cut off DCDC1, because then display blocks i2c bus
|
||||||
pmu.setPowerOutPut(AXP192_LDO3, AXP202_OFF); // gps off
|
pmu.setPowerOutPut(AXP192_LDO3, AXP202_OFF); // gps off
|
||||||
pmu.setPowerOutPut(AXP192_LDO2, AXP202_OFF); // lora off
|
pmu.setPowerOutPut(AXP192_LDO2, AXP202_OFF); // lora off
|
||||||
|
@ -79,8 +79,8 @@ void enter_deepsleep(const int wakeup_sec, const gpio_num_t wakeup_gpio) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set up power domains
|
// set up power domains
|
||||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON);
|
//esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON);
|
||||||
|
|
||||||
// set wakeup timer
|
// set wakeup timer
|
||||||
if (wakeup_sec)
|
if (wakeup_sec)
|
||||||
esp_sleep_enable_timer_wakeup(wakeup_sec * 1000000);
|
esp_sleep_enable_timer_wakeup(wakeup_sec * 1000000);
|
||||||
@ -99,15 +99,14 @@ void enter_deepsleep(const int wakeup_sec, const gpio_num_t wakeup_gpio) {
|
|||||||
dp_shutdown();
|
dp_shutdown();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
// switch off radio
|
// switch off radio
|
||||||
#if (BLECOUNTER)
|
#if (BLECOUNTER)
|
||||||
|
stop_BLEscan();
|
||||||
btStop();
|
btStop();
|
||||||
#endif
|
#endif
|
||||||
#if (WIFICOUNTER)
|
#if (WIFICOUNTER)
|
||||||
switch_wifi_sniffer(0);
|
switch_wifi_sniffer(0);
|
||||||
#endif
|
#endif
|
||||||
*/
|
|
||||||
|
|
||||||
// reduce power if has PMU
|
// reduce power if has PMU
|
||||||
#ifdef HAS_PMU
|
#ifdef HAS_PMU
|
||||||
|
Loading…
Reference in New Issue
Block a user