sleep power optimization

This commit is contained in:
Klaus K Wilting 2020-12-04 19:09:35 +01:00
parent 04a055b329
commit 95cac817b4
2 changed files with 4 additions and 5 deletions

View File

@ -77,7 +77,7 @@ void AXP192_power(pmu_power_t powerlevel) {
break;
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
pmu.setPowerOutPut(AXP192_LDO3, AXP202_OFF); // gps off
pmu.setPowerOutPut(AXP192_LDO2, AXP202_OFF); // lora off

View File

@ -79,8 +79,8 @@ void enter_deepsleep(const int wakeup_sec, const gpio_num_t wakeup_gpio) {
#endif
// 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
if (wakeup_sec)
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();
#endif
/*
// switch off radio
#if (BLECOUNTER)
stop_BLEscan();
btStop();
#endif
#if (WIFICOUNTER)
switch_wifi_sniffer(0);
#endif
*/
// reduce power if has PMU
#ifdef HAS_PMU