can't read EXT1 wakeup pins correctly on ESP32-S3

nedkonz
Posts: 1
Joined: Tue Jul 30, 2024 7:44 pm

can't read EXT1 wakeup pins correctly on ESP32-S3

Postby nedkonz » Tue Jul 30, 2024 8:04 pm

I am using deep sleep on my ESP32-S3, and that's working well. However, I would like to be able to identify which of several pins caused the EXT1 wakeup. Specifically, I have two pushbuttons and an accelerometer as well as another signal that could cause an EXT1 wakeup. I have tried reading the RTC_CNTL_RTC_EXT_WAKEUP1_STATUS_REG as soon as my code starts running, and that works as long as the wakeup pin is still asserted at the time I read it. However, a short press on one of the pushbuttons will cause a wakeup but when I read the RTC_CNTL_RTC_EXT_WAKEUP1_STATUS_REG register after the button is released I don't see that bit set.

Is this register supposed to latch the EXT1 wakeup source? The documentation of the RTC_CNTL_EXT_WAKEUP1_STATUS_CLR bit in the RTC_CNTL_RTC_EXT_WAKEUP1_REG implies that the wakeup pins are indeed latched:
RTC_CNTL_EXT_WAKEUP1_STATUS_CLR Clears the EXT1 wakeup status. (WO)
I have searched the startup C code (I'm using MicroPython) for writes to the RTC_CNTL_EXT_WAKEUP1_STATUS_CLR bit in the RTC_CNTL_RTC_EXT_WAKEUP1_REG register, but I haven't seen anything obvious. Of course, the esp-idf startup code could be doing this.

Who is online

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