wakeup_cause() from light sleep

Rostyslav
Posts: 2
Joined: Tue Apr 03, 2018 9:25 pm

wakeup_cause() from light sleep

Postby Rostyslav » Tue Apr 03, 2018 9:34 pm

Hi, it seems that the esp_sleep_get_wakeup_cause() does not work with light sleep. Is there a way to identify wakeup cause from light sleep? Thanks.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: wakeup_cause() from light sleep

Postby WiFive » Wed Apr 04, 2018 10:36 am

Probably it is blocked by https://github.com/espressif/esp-idf/bl ... #L495-L497

Maybe rtc_get_wakeup_cause

Rostyslav
Posts: 2
Joined: Tue Apr 03, 2018 9:25 pm

Re: wakeup_cause() from light sleep

Postby Rostyslav » Wed Apr 04, 2018 2:49 pm

You're right. The rtc_get_reset_reason(0) should return DEEPSLEEP_RESET for this function to work. Otherwise it returns "UNDEFINED", which is exactly what I get. So, it is intentionally made to work only with deep sleep. Is there a reason for that? The rtc_sleep_wakeup_cause returns the same decimal number regardless of the cause (I use two sources - a timer and GPIO wakeup)

Who is online

Users browsing this forum: No registered users and 89 guests