andom Task Watchdog Timeout on ESP32-C3 Using ESP-IDF v5.3.3

milan pipaliya
Posts: 21
Joined: Fri Oct 11, 2024 4:14 am

andom Task Watchdog Timeout on ESP32-C3 Using ESP-IDF v5.3.3

Postby milan pipaliya » Mon Sep 15, 2025 1:15 pm

Hello everyone,

I'm facing a random issue in my program running on the ESP32-C3 using ESP-IDF version v5.3.3. The program works fine most of the time, but occasionally, without any clear pattern, it crashes with the following error message:

E (170600) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (170600) task_wdt: - IDLE (CPU 0)
E (170600) task_wdt: Tasks currently running:
E (170600) task_wdt: CPU 0: wifi
E (170600) task_wdt: Print CPU 0 (current core) backtrace
esp_backtrace_print: Print CPU 0 (current core) registers
--- Stack dump detected
Core 0 register dump:
MEPC : 0x4038852c RA : 0x4038fcfc SP : 0x3fcbae40 GP : 0x3fc9dc00
--- 0x4038852c: esp_crosscore_int_send_yield at /home/dnk131/esp/v5.3/esp-idf/components/esp_system/crosscore_int.c:121
--- 0x4038fcfc: vPortYield at /home/dnk131/esp/v5.3/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:663 (discriminator 3)

TP : 0x3fcbaf10 T0 : 0x00ab8a09 T1 : 0x00000000 T2 : 0x0000902d
S0/FP : 0x3fcb8e28 S1 : 0x00000000 A0 : 0x00000001 A1 : 0x00000001
A2 : 0x3fcbaf20 A3 : 0x00000004 A4 : 0x00000001 A5 : 0x600c0000
A6 : 0x00000001 A7 : 0x6147ae14 S2 : 0x00000001 S3 : 0x3fcbaea8
S4 : 0x3fce0000 S5 : 0x3fce0000 S6 : 0x3fce0000 S7 : 0x3fce0000
S8 : 0x3ff1b000 S9 : 0x3fce0000 S10 : 0x3fcdf934 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x0000ab80 T5 : 0x00000000 T6 : 0x631f8a09
MSTATUS : 0x00001889 MTVEC : 0x40380001 MCAUSE : 0xdeadc0de MTVAL : 0xdeadc0de
--- 0x40380001: _vector_table at /home/dnk131/esp/v5.3/esp-idf/components/riscv/vectors_intc.S:54

MHARTID : 0x00000000





Details:

Platform: ESP32-C3

ESP-IDF version: v5.3.3

Problem: Random Task Watchdog Timeout. The error shows that the IDLE task did not reset the watchdog in time. CPU 0 shows that the wifi task was running.
while using the esprainmkaer device control.

Backtrace points to: esp_crosscore_int_send_yield and vPortYield, suggesting a possible issue with context switching or idle handling.

Additional information:

The issue appears randomly during operation.

There is no obvious pattern, and I have not been able to reproduce it consistently.

It doesn't happen immediately after startup but after some time of operation.

I suspect it might be related to Wi-Fi activity or interrupt handling but have not been able to confirm this.e

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Qwantbot, Semrush [Bot] and 3 guests