Touch and GPIO wake-up interrupts can't be used simultaneously?

JohnWickham
Posts: 1
Joined: Sun Sep 11, 2022 3:30 pm

Touch and GPIO wake-up interrupts can't be used simultaneously?

Postby JohnWickham » Mon Sep 12, 2022 12:54 am

Hi everyone! I'm working on a project using UnexpectedMaker’s TinyS2 ESP32-S2 board in Arduino. It involves waking ESP32 from deep sleep using both a touchpad wakeup (esp_sleep_enable_touchpad_wakeup) and external GPIO interrupt (esp_sleep_enable_ext0_wakeup). This board has an RTC GPIO pin connected to VBUS, so the presence of USB power can be used to wake from sleep when USB is connected.

Both of these methods work exactly as I expect on their own. But when I try to combine them so that either one will wake from sleep, only the first one enabled will actually work (i.e. calling esp_sleep_enable_touchpad_wakeup before calling esp_sleep_enable_ext0_wakeup and then sleeping, the touch wake-up works, but connecting to USB doesn't wake it. Conversely, when calling them in the opposite order, USB power will wake it, but touch will not).

I noticed a note (https://docs.espressif.com/projects/esp ... akeup-ext0) from Espressif that the external GPIO wake-up source isn't compatible with other wake-up sources on original ESP32, but docs for ESP32-S2 indicate that they can be combined just fine (https://docs.espressif.com/projects/esp ... modes.html).

Has anyone run into this? Any ideas on how to get these wake-up sources to play nicely together?

Who is online

Users browsing this forum: No registered users and 63 guests