wakeup_cause() from light sleep
Posted: Tue Apr 03, 2018 9:34 pm
by Rostyslav
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.
Re: wakeup_cause() from light sleep
Posted: Wed Apr 04, 2018 10:36 am
by WiFive
Re: wakeup_cause() from light sleep
Posted: Wed Apr 04, 2018 2:49 pm
by Rostyslav
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)