diff --git a/platformio.ini b/platformio.ini index 18e12b5..7b50617 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,4 +25,5 @@ lib_deps = ESP Async WebServer@>=1.2.0 AsyncTCP@>=1.1.1 ArduinoJson@>=6.15.2 - ESP32SSPD@>=1.1.0 \ No newline at end of file + ESP32SSPD@>=1.1.0 +;monitor_filters= default, esp32_exception_decoder \ No newline at end of file diff --git a/src/hardware/pmu.cpp b/src/hardware/pmu.cpp index 4d510fd..9cd9982 100644 --- a/src/hardware/pmu.cpp +++ b/src/hardware/pmu.cpp @@ -63,11 +63,6 @@ void IRAM_ATTR pmu_irq( void ) { if ( xHigherPriorityTaskWoken ) { portYIELD_FROM_ISR(); } - /* - * fast wake up from IRQ - */ - // rtc_clk_cpu_freq_set(RTC_CPU_FREQ_240M); - setCpuFrequencyMhz(240); } void pmu_standby( void ) { @@ -175,6 +170,8 @@ void pmu_loop( TTGOClass *ttgo ) { * handle IRQ event */ if ( xEventGroupGetBitsFromISR( pmu_event_handle ) & PMU_EVENT_AXP_INT ) { + setCpuFrequencyMhz(240); + ttgo->power->readIRQ(); if (ttgo->power->isVbusPlugInIRQ()) { powermgm_set_event( POWERMGM_PMU_BATTERY );