WDT timeout in bootloader for ESP32s2
Posted: Mon Jan 04, 2021 1:40 pm
My app is aborting and rebooting after only 1251 millis.
If I modify the app even slightly (eg adding a log line that is never called) then it starts working again at least until some other arbitrary code modification causes it to stop working.
When it aborts it doesn't provide any info, just stops logging and starts over with:
The only clues I can see is the last 2 lines of log above where it indicates that the CPU was reset by the WatchDog. But the address it gives 0x4004c3ee points to bootloader code:
Note that commenting out code till it starts working isn't a helpful suggestion since *any* code change causes it to start working again.
I'm looking for any clues as to what is occurring.
If I modify the app even slightly (eg adding a log line that is never called) then it starts working again at least until some other arbitrary code modification causes it to stop working.
When it aborts it doesn't provide any info, just stops logging and starts over with:
Code: Select all
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x8 (TG1WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40334a69
SPIWP:0xee
mode:DIO, clock div:2
load:0x3ffe6100,len:0x8
load:0x3ffe6108,len:0x1814
load:0x4004c000,len:0x9d8
load:0x40050000,len:0x2e34
entry 0x4004c1ec
I (51) boot: ESP-IDF v4.3-dev-1904-gbaef16f9f-dirty 2nd stage bootloader
I (51) boot: compile time 11:29:41
I (51) boot: chip revision: 0
I (55) boot.esp32s2: SPI Speed : 40MHz
I (60) boot.esp32s2: SPI Mode : DIO
I (64) boot.esp32s2: SPI Flash Size : 4MB
W (69) boot.esp32s2: PRO CPU has been reset by WDT.
W (75) boot.esp32s2: WDT reset info: PRO CPU PC=0x4004c3ee
The only clues I can see is the last 2 lines of log above where it indicates that the CPU was reset by the WatchDog. But the address it gives 0x4004c3ee points to bootloader code:
Code: Select all
xtensa-esp32s2-elf-addr2line -pfiaC -e build/bootloader/bootloader.elf 0x4004c3ee
0x4004c3ee: wdt_reset_info_dump at E:/Dev/Espressif/esp-idf/components/bootloader_support/src/esp32s2/bootloader_esp32s2.c:240
(inlined by) bootloader_check_wdt_reset at E:/Dev/Espressif/esp-idf/components/bootloader_support/src/esp32s2/bootloader_esp32s2.c:276
(inlined by) bootloader_init at E:/Dev/Espressif/esp-idf/components/bootloader_support/src/esp32s2/bootloader_esp32s2.c:326
I'm looking for any clues as to what is occurring.