How to get hibernate?

atlascoder
Posts: 51
Joined: Wed Aug 30, 2017 12:36 pm

How to get hibernate?

Postby atlascoder » Wed Sep 20, 2017 7:13 pm

Hi!

There is in docs written that the Hibernate mode has all domains off, and only RTC Timer still on.
I use the follofing code:

Code: Select all

	esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
	esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
	esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
	esp_deep_sleep_enable_timer_wakeup(((uint64_t) sec) * 1000000);
	esp_deep_sleep_start();
to get the hibernation mode.

And debug output is showing:

Code: Select all

D (133238) deepsleep: RTC_PERIPH: AUTO(OFF), RTC_SLOW_MEM: ON, RTC_FAST_MEM: ON
Why RTC_SLOW_MEM is still ON? How to turn off all power domains?

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

Re: How to get hibernate?

Postby ESP_igrr » Thu Sep 21, 2017 4:22 am

Hi, can you tell which IDF commit ID you are using?

With the latest version of master branch, the following code

Code: Select all

    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
    esp_sleep_enable_timer_wakeup(1000000);
    esp_deep_sleep_start();
results in the following debug output:

Code: Select all

D (2035) sleep: RTC_PERIPH: OFF, RTC_SLOW_MEM: OFF, RTC_FAST_MEM: OFF

atlascoder
Posts: 51
Joined: Wed Aug 30, 2017 12:36 pm

Re: How to get hibernate?

Postby atlascoder » Thu Sep 21, 2017 1:46 pm

Hi, thanks for reply!
I actually use cc93e1 from Jun 19 16:19:49 2017.. Its pretty old sources.

But sorry, I've just seen that everything is ok!
Hmm, I guess it was happened after I removed RTC_DATA_ATTR macro from a declaration of variable in my code.
Looks like it is determinig automatically if any data has placed into RTC MEM and that domain is forced to power on even if it was powered down by code.

BTW, is there a sense to update my source? Was there any critical update?

Thanks!

Who is online

Users browsing this forum: Bing [Bot], EG1966 and 105 guests