ESP32C3: esp_sleep_get_wakeup_cause() not detecting wakup from IO
Posted: 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.
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.