Code: Select all
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, 0);
esp_sleep_enable_ext1_wakeup(GPIO_SEL_32, ESP_EXT1_WAKEUP_ANY_HIGH);
esp_sleep_enable_timer_wakeup(CHARGING_WAKEUP_INTERVAL);
Code: Select all
wakeup_reason = esp_sleep_get_wakeup_cause();
Serial.println("wakeup_reason");
Serial.println(wakeup_reason);
Now when I comment out the timer source esp_sleep_enable_timer_wakeup(CHARGING_WAKEUP_INTERVAL), in this case I get the correct wakeup reason as EXT0.
Anyone has an idea why?
I'm only giving out extracts as they are part of a much larger program. I'm using Board manager 2.0.3