ESP32-C6: esp_sleep_get_gpio_wakeup_status sometimes returns 0

blastrock
Posts: 1
Joined: Sun Oct 01, 2023 8:58 am

ESP32-C6: esp_sleep_get_gpio_wakeup_status sometimes returns 0

Postby blastrock » Sun Oct 01, 2023 9:05 am

Hi,

I'm currently tweaking the deep_sleep example from the esp-idf. I have disabled the EXT1 wakeup (to optimize power usage) and I'm trying to wake up my ESP32-C6-DevKitC-1 using GPIO0 high. The board does wake up, however if I press the button on GPIO0 very quick, after the wake up, the esp_sleep_get_gpio_wakeup_status function returns 0, even though esp_sleep_get_wakeup_cause returned ESP_SLEEP_WAKEUP_GPIO. So I can't know which pin triggered the wake up. If I press the button longer, the function correctly returns the pin mask.

Is this a limitation of this module? Can it be fixed in software? The only workaround I found is to put a capacitor + resistor on the pin so that it stays high a little longer when the button is pressed.

Also, if I use EXT1 and esp_sleep_get_ext1_wakeup_status, I do not have this issue, but EXT1 consumes a lot more power.

Who is online

Users browsing this forum: No registered users and 20 guests