Crash entering deep sleep with IDF 5.2.1
Posted: Thu May 09, 2024 10:17 pm
I'm working on upgrading my code from IDF 5.1.2 to 5.2.1 and am seeing a crash when the code enters deep sleep. Here's the crash:
Here's my setup before entering deep sleep:
Any ideas what could be causing this? The same code has been working great on IDF v5.1.2.
Thanks!
Code: Select all
I (11614) cl_main: Deep sleep for 289277 millis
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0).
Core 0 register dump:
PC : 0x4008206b PS : 0x00060b34 A0 : 0x80085a16 A1 : 0x3ffc5bf0
0x4008206b: uart_ll_is_tx_idle at /Users/chris/esp/esp-idf/components/hal/esp32/include/hal/uart_ll.h:863
(inlined by) esp_rom_uart_tx_wait_idle at /Users/chris/esp/esp-idf/components/esp_rom/patches/esp_rom_uart.c:22
A2 : 0x00000001 A3 : 0x00000000 A4 : 0x000023d7 A5 : 0x00006b80
A6 : 0x00000000 A7 : 0x50001fe8 A8 : 0x3ff50000 A9 : 0x3ffc5c10
A10 : 0x3ffb0058 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00000000
A14 : 0x3f404f35 A15 : 0x000003e5 SAR : 0x00000009 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd
0x400014fd: strlen in ROM
0x4000150d: strlen in ROM
Backtrace: 0x40082068:0x3ffc5bf0 0x40085a13:0x3ffc5c20 0x40085ac3:0x3ffc5c40 0x40085d3d:0x3ffc5c90 0x40085d79:0x3ffc5cb0 0x400dbd2b:0x3ffc5cd0 0x400dc132:0x3ffc5cf0 0x401b8d1b:0x3ffc5d60 0x4008c15d:0x3ffc5d90
0x40082068: esp_rom_uart_tx_wait_idle at /Users/chris/esp/esp-idf/components/esp_rom/patches/esp_rom_uart.c:22 (discriminator 4)
0x40085a13: flush_uarts at /Users/chris/esp/esp-idf/components/esp_hw_support/sleep_modes.c:440
0x40085ac3: esp_sleep_start at /Users/chris/esp/esp-idf/components/esp_hw_support/sleep_modes.c:652
0x40085d3d: deep_sleep_start at /Users/chris/esp/esp-idf/components/esp_hw_support/sleep_modes.c:982
0x40085d79: esp_deep_sleep_start at /Users/chris/esp/esp-idf/components/esp_hw_support/sleep_modes.c:1005
0x400dbd2b: enterDeepSleep at /Users/chris/cl/firmware-esp32/main/CLMain.c:664
0x400dc132: app_main at /Users/chris/cl/firmware-esp32/main/CLMain.c:275
0x401b8d1b: main_task at /Users/chris/esp/esp-idf/components/freertos/app_startup.c:208
0x4008c15d: vPortTaskWrapper at /Users/chris/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
Code: Select all
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
esp_sleep_enable_ulp_wakeup();
esp_sleep_enable_ext1_wakeup(1ULL << fwContext.clDevice.cfg.buttonAPin, ESP_EXT1_WAKEUP_ALL_LOW);
esp_sleep_enable_timer_wakeup(sleepMillis * 1000);
ESP_LOGI(TAG, "Deep sleep for %lu millis", sleepMillis);
esp_deep_sleep_start();
Thanks!