Code: Select all
esp_sleep_enable_ext0_wakeup(gpio_num_t(CHARGER_PLUGGED_PIN), HIGH);
esp_deep_sleep(sleep_time);
However, if the battery runs out, the ESP doesn't wake up when external power is connected.
* Connecting PROG port shows no activity on serial monitor.
* Connecting external power to VBUS moves CHARGER_PLUGGED_PIN to high, but the ESP doesn't wake. No serial monitor activity either.
Is this a known issue? Are there any workarounds?