Page 1 of 1

ESP32C3: esp_sleep_get_wakeup_cause() not detecting wakup from IO

Posted: Wed Jul 27, 2022 2:03 pm
by Jeroenvdb
Hello,

we are using two wakeup sources to wakup the ESP32C3 (using IDF 4.4.1) from deep-sleep, a RTC timer and RTC_IO. This is working as expected.

However we are not able to detect the wakeup cause (runtime) correctly. Both esp_sleep_get_wakeup_cause() and esp_reset_reason() functions do give the result expected.

Wakeup from RTC timer gives the correct results:
esp_reset_reason() returns ESP_RST_DEEPSLEEP
esp_sleep_get_wakeup_cause() returns ESP_SLEEP_WAKEUP_TIMER

Wakeup from RTC IO gives incorrect results:
esp_reset_reason() returns ESP_RST_POWERON
esp_sleep_get_wakeup_cause() returns ESP_SLEEP_WAKEUP_UNDEFINED.

It looks like the esp_rom_get_reset_reason() function, used by esp_reset_reason() does not return the correct value.

We did not find any errata of known issues explaining this behaviour.

Did anybody get the esp_sleep_get_wakeup_cause() function working as expected?

Many thanks.

Re: ESP32C3: esp_sleep_get_wakeup_cause() not detecting wakup from IO

Posted: Thu Sep 14, 2023 12:24 pm
by andrewandroid
I also have this issue. I just posted details to this other thread with the same problem:

viewtopic.php?f=13&t=34236&p=120373#p120373

Re: ESP32C3: esp_sleep_get_wakeup_cause() not detecting wakup from IO

Posted: Thu Sep 14, 2023 12:30 pm
by andrewandroid
I also have this issue. I just posted details to this other thread with the same problem:

viewtopic.php?f=13&t=34236&p=120373#p120373