restoring gpio to normal after waking up from deep sleep
Posted: Tue Feb 19, 2019 7:13 am
Hi!
So in order to save power during deep-sleep, I've added the rtc_gpio_isolate(PIN_A) API like this:
However, PIN_A does not respond after wake up. PIN_A is connected to an LED, I wanna turn on. How do I make this pin work after wakeup? Shouldn't the pin reset at wake-up? If I comment the rtc_gpio_isolate(PIN_A) API though, the pin works normally.
So in order to save power during deep-sleep, I've added the rtc_gpio_isolate(PIN_A) API like this:
Code: Select all
rtc_gpio_isolate(PIN_A);
esp_sleep_enable_ext0_wakeup(BUTTON_GPIO, 1);
esp_sleep_enable_timer_wakeup(wakeup_time_sec * 1000000);
esp_deep_sleep_start();