Question about Wake from Deep Sleep using EXT1
Posted: Wed Apr 08, 2020 1:08 am
Hi,
The ESP32 can be woken up from deep sleep using EXT1. It is described as follows:
This wake up source allows you to use multiple RTC GPIOs. You can use two different logic functions:
1. Wake up the ESP32 if any of the pins you’ve selected are high;
2. Wake up the ESP32 if all the pins you’ve selected are low.
EXT1 can be used to detect multiple pin interrupts unlike EXT0 which can only detect 1 pin.
I understand the first one. As long as any of the pins go high, the ESP32 will be woken up. This is useful if I have multiple interrupt sources (all active high) and I want to know which source has triggered the interrupt to wake the ESP32.
However, the second one doesn't make sense to me. It wakes the ESP only if ALL the pins are low. This means that if I have multiple interrupt sources (all active low), the ESP32 will only be woken up if all the interrupts are triggered at the same time.
So my question is, if I have 3 sensors all with active LOW interrupt. I want to wake the ESP32 from deep sleep and also know which sensor has triggered an interrupt. What should I do?
Thanks in advance!
The ESP32 can be woken up from deep sleep using EXT1. It is described as follows:
This wake up source allows you to use multiple RTC GPIOs. You can use two different logic functions:
1. Wake up the ESP32 if any of the pins you’ve selected are high;
2. Wake up the ESP32 if all the pins you’ve selected are low.
EXT1 can be used to detect multiple pin interrupts unlike EXT0 which can only detect 1 pin.
I understand the first one. As long as any of the pins go high, the ESP32 will be woken up. This is useful if I have multiple interrupt sources (all active high) and I want to know which source has triggered the interrupt to wake the ESP32.
However, the second one doesn't make sense to me. It wakes the ESP only if ALL the pins are low. This means that if I have multiple interrupt sources (all active low), the ESP32 will only be woken up if all the interrupts are triggered at the same time.
So my question is, if I have 3 sensors all with active LOW interrupt. I want to wake the ESP32 from deep sleep and also know which sensor has triggered an interrupt. What should I do?
Thanks in advance!