ESP32-S3 deep sleep wake stub gpio access

tomatosoup
Posts: 4
Joined: Tue Sep 27, 2022 7:57 pm

ESP32-S3 deep sleep wake stub gpio access

Postby tomatosoup » Tue Nov 26, 2024 4:37 pm

Hello

I have an application where I want to trigger the ESP32S3 with a Button. The button should be properly debounced.

Thus, my idea is to put the ESP32S3 into deep sleep, wake it with interrupt from deep sleep and perform some software based debouncing from within the deep sleep wake stub function.

Is this a sensible approach?

Unfortunately, while trying to implement this, I noticed the device is crashing as soon as I try to run rtc_gpio_init().
I guess this is because this function isn't in the ROM. Is there some kind of ROM function or similar to access the GPIO from within the stub?
Or is the only way to solve this to directly access the GPIO registers?

Code: Select all

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x5 (DSLEEP),boot:0x28 (SPI_FAST_FLASH_BOOT)
pro cpu reset by JTAG

Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
Core 0 register dump:
PC      : 0x42009c62  PS      : 0x00060830  A0      : 0xa00fe045  A1      : 0x3fceb690
--- 0x42009c62: rtc_gpio_init at /home/user/esp/esp-idf/components/esp_driver_gpio/src/rtc_io.c:47

A2      : 0x3ff1a8cb  A3      : 0x3ff1aa71  A4      : 0x3ff1be50  A5      : 0x00000000
A6      : 0x3ff1bc44  A7      : 0x0070efc0  A8      : 0xa00fe0d1  A9      : 0x3fceb670
A10     : 0x50000000  A11     : 0x50000000  A12     : 0x80044186  A13     : 0x3fceb5e0
A14     : 0x00000000  A15     : 0x400559a4  SAR     : 0x0000001b  EXCCAUSE: 0x00000000
--- 0x400559a4: xtos_p_none in ROM

Who is online

Users browsing this forum: No registered users and 86 guests