RTC Alarm triggering low and esp_sleep_enable_ext1_wakeup

marommel
Posts: 2
Joined: Tue Jan 28, 2020 6:58 pm

RTC Alarm triggering low and esp_sleep_enable_ext1_wakeup

Postby marommel » Tue Jan 28, 2020 7:12 pm

Hi,
trying to wake up my esp32 (ttgo t-call) from deep sleep with the esp_sleep_enable_ext1_wakeup function. But my RTC ds3231 alarm pulls low on alarm event. that's with the ext1 methode a problem for me, because I want to use as a second possibility to wake up by push button. the ext1 function can be configured for any_high or all_low. neighther fits in my case. Would need a any_low....

Someone got a hint for me? Maybe inverting the RTC alarm signal? Or using another methode for waking up?

Thanks a lot
Markus

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

Re: RTC Alarm triggering low and esp_sleep_enable_ext1_wakeup

Postby boarchuz » Wed Jan 29, 2020 6:27 pm

Datasheet says it's an open drain output so just connect the button and the RTC interrupt to the same pin, with a single pull-up resistor.

marommel
Posts: 2
Joined: Tue Jan 28, 2020 6:58 pm

Re: RTC Alarm triggering low and esp_sleep_enable_ext1_wakeup

Postby marommel » Wed Jan 29, 2020 7:07 pm

Hi boarchuz,
thanks for your answer. True it's possible but then its more "work" to find out what triggert the wake up. At a German Forum I got a simple hint:

Code: Select all

//Button (GPIO 26) auf Low (0)
esp_sleep_enable_ext0_wakeup(GPIO_NUM_26,0);

//Button (GPIO MASK = 2^27 = 0x800 0000 -> GPIO 27) auf Low (0)
esp_sleep_enable_ext1_wakeup(0x8000000,ESP_EXT1_WAKEUP_ALL_LOW);
By that, weather IO27 or IO26 kan wake up triggering low (or high with according settings).

Thanks a lot anyway.
Markus

Who is online

Users browsing this forum: No registered users and 137 guests