I want to make an interrupt while deep sleep

JorgeSayMe
Posts: 7
Joined: Mon Feb 17, 2020 4:40 pm

I want to make an interrupt while deep sleep

Postby JorgeSayMe » Wed Sep 09, 2020 12:00 pm

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?

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: I want to make an interrupt while deep sleep

Postby ESP_Sprite » Wed Sep 09, 2020 7:30 pm

You may want to look into using the ULP for that.

boarchuz
Posts: 297
Joined: Tue Aug 21, 2018 5:28 am

Re: I want to make an interrupt while deep sleep

Postby boarchuz » Wed Sep 09, 2020 7:51 pm

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

Who is online

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