Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepSleep available? #51

Closed
peterotte opened this issue Nov 15, 2016 · 16 comments
Closed

deepSleep available? #51

peterotte opened this issue Nov 15, 2016 · 16 comments
Labels
Status: To be implemented Selected for Development

Comments

@peterotte
Copy link

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

@me-no-dev
Copy link
Member

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

@me-no-dev me-no-dev added the Status: To be implemented Selected for Development label Nov 16, 2016
@GiraffeGiraffe
Copy link

Any timeline for this?

@torntrousers
Copy link
Contributor

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

@igrr
Copy link
Member

igrr commented Dec 16, 2016

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

@torntrousers
Copy link
Contributor

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

@igrr
Copy link
Member

igrr commented Dec 16, 2016

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

@GiraffeGiraffe
Copy link

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

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

@igrr
Copy link
Member

igrr commented Dec 18, 2016

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).

@GiraffeGiraffe
Copy link

Thanks, I will try this.

@GiraffeGiraffe
Copy link

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?

@me-no-dev me-no-dev reopened this Feb 8, 2017
@Ashok07
Copy link

Ashok07 commented Mar 24, 2017

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.

@mdenuit
Copy link

mdenuit commented Mar 24, 2017

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.

@moujix
Copy link

moujix commented Oct 25, 2017

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

@Rita858
Copy link

Rita858 commented Feb 27, 2020

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

@martinius96
Copy link
Contributor

Nothing new about hibernation in Arduino core?

Lzw655 pushed a commit to Lzw655/arduino-esp32 that referenced this issue Oct 12, 2023
- increase default number of NTP servers up to 3 (match with Arduino esp8266)
 - activate SNTP over DHCP requests (match with Arduino esp8266)

addressing issue  espressif#4964
provided via  espressif/esp-idf#7336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: To be implemented Selected for Development
Projects
None yet
Development

No branches or pull requests