Question about Wake from Deep Sleep using EXT1

kian79
Posts: 28
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: 2230
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?

dmitrij999
Posts: 64
Joined: Sat Mar 02, 2019 8:06 pm

Re: Question about Wake from Deep Sleep using EXT1

Postby dmitrij999 » Wed Sep 22, 2021 8:35 pm

chegewara wrote:
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?
Yes, we do, but it's more electronic components, thus, it's power consumption, and it sounds as workaround, instead of ANY_LOW mode which might be useful.
The workaround is use ext0 and ext1 differently but it constraints wake-up sources count to 2. Another one, use ULP to poll, but it suitable for slow wake-up sources, such as USB charger connected or button pressed

fahar intisar
Posts: 2
Joined: Fri Dec 10, 2021 9:46 am

Re: Question about Wake from Deep Sleep using EXT1

Postby fahar intisar » Fri Dec 10, 2021 9:50 am

Did you find any solution other than changing hardware? I am facing same problem I need any_low mode (I am using three pins).

Who is online

Users browsing this forum: jonnny, ramier, sb_espressif and 71 guests