diff --git a/src/power.cpp b/src/power.cpp index a813eb60..3dee573c 100644 --- a/src/power.cpp +++ b/src/power.cpp @@ -140,9 +140,6 @@ void AXP192_init(void) { pmu.adc1Enable(AXP202_VBUS_VOL_ADC1, true); pmu.adc1Enable(AXP202_VBUS_CUR_ADC1, true); - // switch power rails on - AXP192_power(pmu_power_on); - #ifdef PMU_INT pinMode(PMU_INT, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(PMU_INT), PMUIRQ, FALLING); @@ -161,6 +158,9 @@ void AXP192_init(void) { pmu.enableChargeing(true); #endif + // switch power rails on + AXP192_power(pmu_power_on); + ESP_LOGI(TAG, "AXP192 PMU initialized"); } } diff --git a/src/reset.cpp b/src/reset.cpp index 00668e0b..f740d002 100644 --- a/src/reset.cpp +++ b/src/reset.cpp @@ -51,10 +51,6 @@ void do_after_reset(void) { ESP_LOGI(TAG, "Time spent in deep sleep: %d ms", sleep_time_ms); RTC_runmode = RUNMODE_WAKEUP; -// power on all rails if has PMU -#ifdef HAS_PMU - AXP192_power(pmu_power_on); -#endif break; case ESP_SLEEP_WAKEUP_ALL: