Getting error message: "Task watchdog got triggered" too frequently.

mmurty
Posts: 3
Joined: Fri Feb 28, 2020 9:19 am

Getting error message: "Task watchdog got triggered" too frequently.

Postby mmurty » Fri Feb 28, 2020 1:20 pm

Hello ESP Team,

Environment Details:
Board: ESP32-WROOM32 module soldered on an custom board.
ESP-IDF Version 3.3.1
MSYS32 Environment with python 2.7
IDE: Eclipse.

Problem Description:
I have implemented a logic to read data from a UART device and send it to a cloud service. ESP32 is connected to a serial GSM modem SIM900C and I use PPP to communicate with the cloud server. I have aroud 3-4 FreeRTOS tasks running to manage my stuff.
The problem I face is, when I debug the ESP board using JTAG I feel my logic to be working fine but when I see the ESP32's log output on UART I see the below message popping up several times. Most of the time I don't see any issues with this but occassionally I see the controller getting restarted. I feel I need to take some care regarding the watchdog timer but I am unable to find a solid documentation describing the WDT task's behavior and implementation in ESP-IDF.

Below is the message which I see frequently:
E (6104) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (6104) task_wdt: - IDLE1 (CPU 1)
E (6104) task_wdt: Tasks currently running:
E (6104) task_wdt: CPU 0: IDLE0
E (6104) task_wdt: CPU 1: CORE

Can anyone describe what does it mean and where can I find the documentation related to the WDT task?

Note: I am not using the WiFi for internet access and my code does not use any WiFi related APIs. I doubt that I may have to disable the protocol processing CPU or free it from handling WiFi tasks or unsubscribe the protocol CPU from sending WDT events.

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: Getting error message: "Task watchdog got triggered" too frequently.

Postby ESP_Sprite » Sat Feb 29, 2020 9:57 am

In general, this means the idle tasks (which need to run in FreeRTOS for some housekeeping tasks) haven't all been able to run for a few seconds. This normally indicates that you have one task (in your case, CORE) that is hogging all CPU power and not yielding to other, lower-priority tasks. This can happen when e.g. you use a spinlock (while (variable==0) ;) instead of FreeRTOS blocking constructs like muxes and semaphores.

mmurty
Posts: 3
Joined: Fri Feb 28, 2020 9:19 am

Re: Getting error message: "Task watchdog got triggered" too frequently.

Postby mmurty » Mon Mar 02, 2020 7:15 am

Thanks for the reply.
I noticed that the CORE task was starving other tasks.
It solved my issue.
But can you provide more information regarding the WDT implementation.
What is the WDT interval ?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Getting error message: "Task watchdog got triggered" too frequently.

Postby ESP_Angus » Mon Mar 02, 2020 11:30 pm

Hi mmurty,

The docs for the WDT features can be found here:
https://docs.espressif.com/projects/esp ... /wdts.html

The config item for the default Task WDT time period isn't mentioned on that page (will fix), but it's found alongside the other WDT config items which are mentioned:
https://docs.espressif.com/projects/esp ... -timeout-s

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot], vpascucci and 249 guests