Skip to content

[ESP32-C5]Interrupt wdt timeout when called esp_restart() (IDFGH-16688) #17780

@404-code

Description

@404-code

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.5.1-1-g129cd0d247

Espressif SoC revision.

Chip is ESP32-C5 (revision v1.0)

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32-C5-DevKitC-1

Power Supply used.

USB

What is the expected behavior?

When I restart system by software, the uart should be initialized successfully.

What is the actual behavior?

When I restart, the log showed:

Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)

Steps to reproduce.

  1. I used the demo: examples/peripherals/uart/uart_echo
  2. add following code after line 72:
if (len) {
    data[len] = '\0';
    ESP_LOGI(TAG, "Recv str: %s", (char *) data);
    printf("==============Ready to restart=======\r\n");
    // uart_driver_delete(ECHO_UART_PORT_NUM);
    vTaskDelay(1000/portTICK_PERIOD_MS);
    esp_restart();
}
  1. input words by uart to trigger esp_restart();

Debug Logs.

ESP-ROM:esp32c5-eco2-20250121
Build:Jan 21 2025
rst:0x1 (POWERON),boot:0x1e (SPI_FAST_FLASH_BOOT)
SPI mode:DIO, clock div:1
load:0x408556b0,len:0x1710
load:0x4084bba0,len:0xd9c
load:0x4084e5a0,len:0x3198
entry 0x4084bbaa
I (23) boot: ESP-IDF v5.5.1-1-g129cd0d247 2nd stage bootloader
I (23) boot: compile time Oct 27 2025 15:46:26
I (24) boot: chip revision: v1.0
I (25) boot: efuse block revision: v0.2
I (28) boot.esp32c5: SPI Speed      : 80MHz
I (32) boot.esp32c5: SPI Mode       : DIO
I (36) boot.esp32c5: SPI Flash Size : 2MB
I (40) boot: Enabling RNG early entropy source...
I (44) boot: Partition Table:
I (47) boot: ## Label            Usage          Type ST Offset   Length
I (53) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (59) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (66) boot:  2 factory          factory app      00 00 00010000 00100000
I (73) boot: End of partition table
I (76) esp_image: segment 0: paddr=00010020 vaddr=42020020 size=08580h ( 34176) map
I (90) esp_image: segment 1: paddr=000185a8 vaddr=40800000 size=07a70h ( 31344) load
I (97) esp_image: segment 2: paddr=00020020 vaddr=42000020 size=17488h ( 95368) map
I (115) esp_image: segment 3: paddr=000374b0 vaddr=40807a70 size=04e7ch ( 20092) load
I (119) esp_image: segment 4: paddr=0003c334 vaddr=4080c900 size=018f8h (  6392) load
I (124) boot: Loaded app from partition at offset 0x10000
I (124) boot: Disabling RNG early entropy source...
I (140) MSPI Timing: tuning success, best point is index 4
I (141) MSPI Timing: Flash timing tuning index: 4
I (141) cpu_start: Unicore app
I (165) cpu_start: Pro cpu start user code
I (165) cpu_start: cpu freq: 240000000 Hz
I (165) app_init: Application information:
I (165) app_init: Project name:     uart_echo
I (169) app_init: App version:      v5.5.1-1-g129cd0d247
I (174) app_init: Compile time:     Oct 27 2025 15:46:03
I (179) app_init: ELF file SHA256:  037961166...
I (184) app_init: ESP-IDF:          v5.5.1-1-g129cd0d247
I (189) efuse_init: Min chip rev:     v1.0
I (193) efuse_init: Max chip rev:     v1.99 
I (197) efuse_init: Chip rev:         v1.0
I (200) heap_init: Initializing. RAM available for dynamic allocation:
I (207) heap_init: At 4080F140 len 0004D460 (309 KiB): RAM
I (212) heap_init: At 4085C5A0 len 00002F58 (11 KiB): RAM
I (217) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM
I (223) spi_flash: detected chip: generic
I (226) spi_flash: flash io: dio
W (229) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (241) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (247) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (254) main_task: Started on CPU0
I (254) main_task: Calling app_main()
I (284) main_task: Returned from app_main()
I (27444) UART TEST: Recv str: hello world 
==============Ready to restart=======
ESP-ROM:esp32c5-eco2-20250121
Build:Jan 21 2025
rst:0xc (SW_CPU),boot:0x1e (SPI_FAST_FLASH_BOOT)
Core0 Saved PC:0x40806136
SPI mode:DIO, clock div:1
load:0x408556b0,len:0x1710
load:0x4084bba0,len:0xd9c
load:0x4084e5a0,len:0x3198
entry 0x4084bbaa
I (27) boot: ESP-IDF v5.5.1-1-g129cd0d247 2nd stage bootloader
I (28) boot: compile time Oct 27 2025 15:46:26
I (29) boot: chip revision: v1.0
I (29) boot: efuse block revision: v0.2
I (32) boot.esp32c5: SPI Speed      : 80MHz
I (36) boot.esp32c5: SPI Mode       : DIO
I (40) boot.esp32c5: SPI Flash Size : 2MB
I (44) boot: Enabling RNG early entropy source...
I (48) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (57) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (64) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (70) boot:  2 factory          factory app      00 00 00010000 00100000
I (77) boot: End of partition table
I (80) esp_image: segment 0: paddr=00010020 vaddr=42020020 size=08580h ( 34176) map
I (95) esp_image: segment 1: paddr=000185a8 vaddr=40800000 size=07a70h ( 31344) load
I (105) esp_image: segment 2: paddr=00020020 vaddr=42000020 size=17488h ( 95368) map
I (125) esp_image: segment 3: paddr=000374b0 vaddr=40807a70 size=04e7ch ( 20092) load
I (132) esp_image: segment 4: paddr=0003c334 vaddr=4080c900 size=018f8h (  6392) load
I (139) boot: Loaded app from partition at offset 0x10000
I (139) boot: Disabling RNG early entropy source...
I (151) MSPI Timing: tuning success, best point is index 4
I (152) MSPI Timing: Flash timing tuning index: 4
I (152) cpu_start: Unicore app
I (164) cpu_start: Pro cpu start user code
I (164) cpu_start: cpu freq: 240000000 Hz
I (164) app_init: Application information:
I (164) app_init: Project name:     uart_echo
I (168) app_init: App version:      v5.5.1-1-g129cd0d247
I (173) app_init: Compile time:     Oct 27 2025 15:46:03
I (178) app_init: ELF file SHA256:  037961166...
I (183) app_init: ESP-IDF:          v5.5.1-1-g129cd0d247
I (188) efuse_init: Min chip rev:     v1.0
I (191) efuse_init: Max chip rev:     v1.99 
I (195) efuse_init: Chip rev:         v1.0
I (199) heap_init: Initializing. RAM available for dynamic allocation:
I (206) heap_init: At 4080F140 len 0004D460 (309 KiB): RAM
I (211) heap_init: At 4085C5A0 len 00002F58 (11 KiB): RAM
I (216) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM
I (222) spi_flash: detected chip: generic
I (225) spi_flash: flash io: dio
W (228) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (240) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (246) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (253) main_task: Started on CPU0
I (253) main_task: Calling app_main()

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0). 
Core  0 register dump:
MEPC    : 0x4200c728  RA      : 0x4200c6e8  SP      : 0x4085d2d0  GP      : 0x4080d104  
TP      : 0x4085d380  T0      : 0x40025d88  T1      : 0x00000000  T2      : 0x00000000  
S0/FP   : 0x0000000a  S1      : 0x4080ca50  A0      : 0x00000064  A1      : 0x0000000a  
A2      : 0xfffff003  A3      : 0x00000000  A4      : 0x60001000  A5      : 0x00000001  
A6      : 0x00000000  A7      : 0x4085d4ec  S2      : 0x00000000  S3      : 0x00000000  
S4      : 0x00000000  S5      : 0x00000800  S6      : 0x00000000  S7      : 0x00000000  
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
T3      : 0x00000000  T4      : 0x00000000  T5      : 0x00000000  T6      : 0x00000000  
MSTATUS : 0x00001881  MTVEC   : 0x40800003  MCAUSE  : 0x00000018  MTVAL   : 0x00000000  
MHARTID : 0x00000000  

Stack memory:
4085d2d0: 0x00000001 0x4085d2f8 0x00000001 0x42008bc6 0x00000000 0x00000000 0x00000001 0x420092ae
4085d2f0: 0x4085d380 0x4085d300 0x00080195 0x00780a0a 0x420228c8 0x00000000 0x00000000 0x00000000
4085d310: 0x00000000 0x00000000 0x00000001 0x4200679a 0x0001c200 0x00000003 0x00000000 0x00000001
4085d330: 0x00000000 0x00000000 0x00000009 0x00000000 0x00000000 0x00000000 0x00000000 0x40807140
4085d350: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d370: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000150
4085d390: 0x4085d150 0x00000000 0x4080e540 0x4080e540 0x4085d390 0x4080e538 0x0000000f 0x00000000
4085d3b0: 0x00000000 0x4085d390 0x00000000 0x0000000a 0x4085c78c 0x74726175 0x6863655f 0x61745f6f
4085d3d0: 0x00006b73 0x4085d380 0x0000000a 0x00000000 0x00000000 0x00000000 0x00000000 0x4080eeb8
4085d3f0: 0x4080ef20 0x4080ef88 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
4085d410: 0x42006652 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d430: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d450: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d470: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d490: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d4b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d4d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x0000007c 0x00000001 0x00000000 0x4085e21c
4085d4f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4085d564 0x00000000 0x00000101
4085d510: 0x00000000 0x00000000 0x0000000a 0x4085e198 0x00000000 0x00000000 0x00000000 0x00000000
4085d530: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4085d768 0x00000000 0x4085e038
4085d550: 0x4085dfe0 0x4085e140 0x4085e0e8 0x4085e090 0x00000200 0x00000000 0x00000000 0x00000000
4085d570: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d590: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d5b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d5d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d5f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d610: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d630: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d650: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d670: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d690: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4085d6b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

Diagnostic report archive.

No response

More Information.

  1. The codes runs fine for the first time, when I input words by uart to trigger esp_restart(), the iwdt timeout and restarts infinitely, until I press the reset button.
  2. With the same code, it doesn't happen on esp32C3.
  3. When I add uart_driver_delete before restart, it works fine.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions