Page 1 of 1

I want to make an interrupt while deep sleep

Posted: Wed Sep 09, 2020 12:00 pm
by JorgeSayMe
Good morning.

I am developing a tracker based on a ESP32.

I need to reset a counter variable every time I receive a '1' logic in GPIO 27.

I started using ext1 wake up (because I have different wake-up sources)

However, my problem is that I donĀ“t want to wake up the ESP32 every time I get a '1' on GPIO27, due to the high consumption. Instead of that, I want an interrupt routine that resets my counter variable every time that I have a '1' on GPIO 27 while ESP32 is on deep sleep

Is this possible?

Re: I want to make an interrupt while deep sleep

Posted: Wed Sep 09, 2020 7:30 pm
by ESP_Sprite
You may want to look into using the ULP for that.

Re: I want to make an interrupt while deep sleep

Posted: Wed Sep 09, 2020 7:51 pm
by boarchuz
You can configure an RTCIO interrupt without enabling wakeup. Read the int on wake, and clear your counter if set.

Example here: https://gist.github.com/boarchuz/f9cfb4 ... 88c8d500f3