Crash when waking up from light sleep

colman
Posts: 37
Joined: Mon May 30, 2016 7:41 am

Re: Crash when waking up from light sleep

Postby colman » Wed Oct 11, 2017 9:38 am

Does esp32 idf support light sleep mode? The compiler reports error as below:

error: implicit declaration of function 'esp_sleep_enable_timer_wakeup' [-Werror=implicit-function-declaration]
esp_sleep_enable_timer_wakeup(1000000);
^
error: implicit declaration of function 'esp_light_sleep_start' [-Werror=implicit-function-declaration]
int ret = esp_light_sleep_start();
^

Which idf version you are talking about?

Colman

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Crash when waking up from light sleep

Postby ESP_igrr » Thu Oct 12, 2017 3:12 am

If you use master branch (v3.0-dev) of ESP-IDF, you should be able to use light sleep. Make sure you have #include "esp_sleep.h" in your source file.
The fix for the bug mentioned earlier in this topic (light sleep not working in Release builds) has not been merged yet, but if you run into this, you can apply the fix locally — it's a one line change.

Who is online

Users browsing this forum: Bing [Bot], Heggico, nopnop2002 and 88 guests