RTC DS3231 alarm pulls low -> but need high (ESP32)


I guess there is a easy soltuion out there I just don see:

Im Using the arduino IDE to program an ESP32 (ttgo t-call). Things work fine, also wake up from deep sleep using a RTC DS3231 alarm function. Then I came to the idea, that I could in addion wake up by pushbutton. There my problem starts:

To wake up from deep sleep using serveral GPIOs there is the function ESP_SLEEP_ENABLE_EXT1_WAKEUP The ext1 function can be configured for ANY_HIGH or ALL_LOW.

ALL_LOW dosn't make sense as I want to use eigther RTC alarm or button

ANY_HIGH doesn't work as the DS3231 pulls low in case of alarm

What to do? There is no ANY_HIGH setting and the DS3231 can't be switcht to trigger high (as far as I know). Some suggestions?

If that information is needed, the RTC is in GPIO32 and the button on GPIO33

Thanks a lot

Inserting an inverter between the RTC and the ESP?

The alarm output is open collector, you can parallel a switch to ground and use a single input.

Hi pylon,
thanks for your answer. Guess that would work, but well there is a more simpel solution as I got tould.

David, thanks for your answer. Also that is a soultion, but then its more "work" to find out what triggert the wake up.

At a German Forum I got a simple hint:

//Button (GPIO 26) auf Low (0)

//Button (GPIO MASK = 2^27 = 0x800 0000 -> GPIO 27) auf Low (0)

By that, weather IO27 or IO26 kan wake up triggering low (or high with according settings).

Thanks a lot anyway.