Reset in light sleep
Posted: Sat Apr 10, 2021 12:29 am
I have code that puts the ESP32 to light sleep with a timer (10s) and wakes it up. The code works as intended on the ESP32-WROOM32D, but it fails in ESP-WROOM32 (older, no D)
The failure appears to be that the (no D) chip does not go to sleep, and the RTC timer {WD} resets the system; [Confirmed it with an Amp Meter]
rst:0x10 (RTCWDT_RTC_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:1
load:0x3fff0030,len:4
load:0x3fff0034,len:4812
load:0x40078000,len:13840
load:0x40080400,len:3132
entry 0x40080600
I (272) cpu_start: Pro cpu up.
I (272) cpu_start: Starting app cpu, entry point is 0x40081058
0x40081058: call_start_cpu1 at /home/peterglen/esp/esp-idf.4.3/components/esp_system/port/cpu_start.c:124
I tried to disable the RTC timer, no change; but, when I extend the RTC timer's wachdog interval, it extends the reboot interval.
The sleep code does not contain anything special; just calling the API-s as normal.
gl_light_milli is set to 10
esp_err_t errw = esp_sleep_enable_timer_wakeup(gl_light_milli * 1000);
esp_light_sleep_start();
// wake code ... just a printf etc
This works well on the WROOM32D / DevKitC V4; does not work on the WROOM32 / DevKitC V2;
I am curious if there be an insight why this is happening, and solution to this. Thank you;
Peter Glen
The failure appears to be that the (no D) chip does not go to sleep, and the RTC timer {WD} resets the system; [Confirmed it with an Amp Meter]
rst:0x10 (RTCWDT_RTC_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:1
load:0x3fff0030,len:4
load:0x3fff0034,len:4812
load:0x40078000,len:13840
load:0x40080400,len:3132
entry 0x40080600
I (272) cpu_start: Pro cpu up.
I (272) cpu_start: Starting app cpu, entry point is 0x40081058
0x40081058: call_start_cpu1 at /home/peterglen/esp/esp-idf.4.3/components/esp_system/port/cpu_start.c:124
I tried to disable the RTC timer, no change; but, when I extend the RTC timer's wachdog interval, it extends the reboot interval.
The sleep code does not contain anything special; just calling the API-s as normal.
gl_light_milli is set to 10
esp_err_t errw = esp_sleep_enable_timer_wakeup(gl_light_milli * 1000);
esp_light_sleep_start();
// wake code ... just a printf etc
This works well on the WROOM32D / DevKitC V4; does not work on the WROOM32 / DevKitC V2;
I am curious if there be an insight why this is happening, and solution to this. Thank you;
Peter Glen