Question about Wake from Deep Sleep using EXT1

kian79
Posts: 21
Joined: Thu Jun 13, 2019 3:27 am

Question about Wake from Deep Sleep using EXT1

Postby kian79 » 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!

chegewara
Posts: 1067
Joined: Wed Jun 14, 2017 9:00 pm

Re: Question about Wake from Deep Sleep using EXT1

Postby chegewara » Wed Apr 08, 2020 7:31 am

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?
Add logic inverter (NOT gate) and use any high?

Who is online

Users browsing this forum: Google [Bot] and 24 guests