deep sleep and light sleep

bgfortran
Posts: 2
Joined: Tue Mar 10, 2020 8:23 pm

deep sleep and light sleep

Postby bgfortran » Tue Mar 10, 2020 9:03 pm

Hi all,
curruntly a am creating project which there is a functuanality for batery safe. I have a following function:

Code: Select all

void SleepMode::goToDeepSleep() {
    Log.notice(F("Going to sleep..." CR));
   esp_bluedroid_disable();
   esp_bt_controller_disable();
   esp_wifi_stop();
    // Configure the timer to wake us up!
   esp_sleep_enable_timer_wakeup(DEEP_SLEEP_TIME * 60L * 1000000L);
   //esp_light_sleep_start();
   esp_deep_sleep_start();
}
I am wandering why i use esp_deep_sleep_start() my program restart from setup() method but with esp_light_sleep_start() the program continues from loop()?

Also i have a following message with esp_deep_sleep_start()

Code: Select all

rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6364
entry 0x400806b8
Is it a some problem?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: deep sleep and light sleep

Postby WiFive » Wed Mar 11, 2020 3:39 am

Deep sleep is shutdown/restart but light sleep is suspend/resume.

Who is online

Users browsing this forum: ok-home and 109 guests