ESP32C3: esp_sleep_get_wakeup_cause() not detecting wakup from IO

Jeroenvdb
Posts: 2
Joined: Wed Dec 22, 2021 2:25 pm

ESP32C3: esp_sleep_get_wakeup_cause() not detecting wakup from IO

Postby Jeroenvdb » Wed Jul 27, 2022 2:03 pm

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.

andrewandroid
Posts: 7
Joined: Sat Dec 26, 2020 7:33 am

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

Postby andrewandroid » Thu Sep 14, 2023 12:24 pm

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

andrewandroid
Posts: 7
Joined: Sat Dec 26, 2020 7:33 am

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

Postby andrewandroid » Thu Sep 14, 2023 12:30 pm

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

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 210 guests