Page 1 of 1

EXT1 Wakeup from Deep Sleep

Posted: Thu Nov 04, 2021 8:41 pm
by slaughterjim
[Codebox=c file=Untitled.c][/Codebox]

I have 2 RTC GPIO inputs that either one can wakeup the ESP32 from deep sleep.
I am using esp_sleep_enable_ext1_wakeup().

The 2 return values from esp_sleep_get_wakeup_cause(void) are:
ESP_EXT1_WAKEUP_ALL_LOW = 0
Wake the chip when all selected GPIOs go low.
ESP_EXT1_WAKEUP_ANY_HIGH = 1
Wake the chip when any of the selected GPIOs go high.

I need to know which GPIO caused the interrupt?
Can I read each GPIO with some function?

There was a similar post in 2020 but I did not understand the answer?
Thanks.

JWS
;

Re: EXT1 Wakeup from Deep Sleep

Posted: Sun Nov 07, 2021 6:40 pm
by felmue
Hello @slaughterjim

check out this example here https://randomnerdtutorials.com/esp32-e ... eep-sleep/ - section Code Multiple GPIOs – External Wake Up.

Thanks
Felix