Arduino-esp32: deepSleep available?

Created on 15 Nov 2016  Â·  16Comments  Â·  Source: espressif/arduino-esp32

Are different sleep modi already supported? E.g. the deepSleep from ESP8266.

to be implemented

Most helpful comment

Hi,everybody.
How to get hibernate?
Is there any example?

All 16 comments

soon :) there is some API exposed but not to switch the sleep mode yet

Any timeline for this?

Using the system call esp_deep_sleep(5000000); seems to work with the latest code and sleeps for that many microseconds.

Also some other wake modes are now implemented (in the ESP-IDF): http://esp-idf.readthedocs.io/en/latest/api/deep_sleep.html

Is it possible to use those from an Arduino sketch somehow?

You can #include "esp_deep_sleep.h" and call these functions. This does require latest ESP-IDF, with Arduino core added as a component.

Now it works: esp_deep_sleep(5000000); Power current is 11uA.

Any way to get hibernation mode deep sleep (2.5uA) ?

Possibly by powering down RTC fast memory. I haven't done current measurements myself yet, so can not say what the resulting current will be.
Also there might be something related to clock selection — right now we are running from 150kHz RC oscillator. I need to check with hardware folks whether running from 32kHz crystal will reduce current (it probably should).

Thanks, I will try this.

How do I get #include esp_deep_sleep.h with arduino?
I don't know how to call esp_deep_sleep_pd_config from arduino?
Can anybody help me?

esp_deep_sleep(15000000); is work for me
but the problem is, when ever the system is wake up it starts running from main(setup), but i just want to run loop only. which means i just want to run my code from where i left in sleep mode;
pls help me to solve this.

I don't know if static or global variables are kept in memory after a wake-up, but you could still store data in flash such as variables you want to save and maybe a function pointer to the resume fonction to be executed just after the deep sleep.

hy
someone help me to make esp sleep for many hour or wake up in specific hour
have you any example with arduino

Hi,everybody.
How to get hibernate?
Is there any example?

Nothing new about hibernation in Arduino core?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ComputerLag picture ComputerLag  Â·  3Comments

Curclamas picture Curclamas  Â·  4Comments

paramono picture paramono  Â·  4Comments

docloulou picture docloulou  Â·  3Comments

AsafFisher picture AsafFisher  Â·  4Comments