Task watchdog got triggered with WiFi and Bluetooth in the same time
Task watchdog got triggered with WiFi and Bluetooth in the same time
Hi,
I'm working on IoT project based on ESP32-WROOM32.
The system must work simultaneously with WiFi and Bluetooth.
Now the device execute this sequence:
1) init NVM
2) init BLE in client mode
3) start scan BLE
4) init WiFi
5) connect to AP of my WiFi router
6) get timestamp
7) connect to IoT service of Google Cloud by MQTT
All works fine rx BLE and tx/rx WiFi but after a few minutes ESP32 said:
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Repeats this message endless times.
WiFi and Bluetooth don't work anymore.
What I can do?
Thank you
I'm working on IoT project based on ESP32-WROOM32.
The system must work simultaneously with WiFi and Bluetooth.
Now the device execute this sequence:
1) init NVM
2) init BLE in client mode
3) start scan BLE
4) init WiFi
5) connect to AP of my WiFi router
6) get timestamp
7) connect to IoT service of Google Cloud by MQTT
All works fine rx BLE and tx/rx WiFi but after a few minutes ESP32 said:
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Repeats this message endless times.
WiFi and Bluetooth don't work anymore.
What I can do?
Thank you
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
Hi vonnieda,
I checked: yes It's the same thing!
Do you have any answer?
I checked: yes It's the same thing!
Do you have any answer?
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
I have a side question: I get also this warning I realize that if I invoke "esp_restart()" API it doesn't work.Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: wifi
CPU 1: IDLE
Since "wifi" task is out of our control, is it possible to automatically reboot the esp32 when a task watchdog triggers?
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
Hi davdav,
Yes, you can.
You must enable panic when WDT happen via menuconfig:
make menuconfig --> Component config --> ESP32-specific --> Invoke panic handler on Task Watchdog timeout
Bye
Yes, you can.
You must enable panic when WDT happen via menuconfig:
make menuconfig --> Component config --> ESP32-specific --> Invoke panic handler on Task Watchdog timeout
Bye
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
Thnaks s.allasia,You must enable panic when WDT happen via menuconfig:
make menuconfig --> Component config --> ESP32-specific --> Invoke panic handler on Task Watchdog timeout
If you enable panic handler the device will be stuck to let you debug (for example via GDB stub) or the device will silently reboot?
Or the behaviour is decided by "make menuconfig --> Component config --> ESP32-specific --> Panic handler behaviour"?
Obviuosly it would be better if a "system task" like "wifi" doesn't trigger the watchdog timeout.
Thanks
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
Oh crap! I've seen it hang the app with wifi like that and my solution was a WD task that called esp_restart. So this isn't good news.davdav wrote:I have a side question: I get also this warning I realize that if I invoke "esp_restart()" API it doesn't work.
Can anyone confirm that the IDF WD set to panic will work correctly in this situation?
John A
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
Hi davdav,
If you enable panic when WDT happen via menuconfig, the behaviour is decided by "make menuconfig --> Component config --> ESP32-specific --> Panic handler behaviour".
If you want disable watchdog, you must disable "Initialize Task Watchdog Timer on startup" (not recommended).
If you enable panic when WDT happen via menuconfig, the behaviour is decided by "make menuconfig --> Component config --> ESP32-specific --> Panic handler behaviour".
If you want disable watchdog, you must disable "Initialize Task Watchdog Timer on startup" (not recommended).
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
Hi fly135,
If a task watchdog triggers it's very probably that calls to functions don't work, "Panic handler behaviour" works instead.
If a task watchdog triggers it's very probably that calls to functions don't work, "Panic handler behaviour" works instead.
Re: Task watchdog got triggered with WiFi and Bluetooth in the same time
I don't find that to be true at all. I get task WD triggers every time I OTA. Erasing the flash causes them. However I don't have the panic handler enabled, so those WD triggers don't actually affect anything. I have my own WD tasks (1 for each core) that are simply task loops that set a flag then delay. Each task has a timer that executes and checks the flags every 2 minutes and calls esp_restart if the flag haven't been set by the task.s.allasia wrote:Hi fly135,
If a task watchdog triggers it's very probably that calls to functions don't work, "Panic handler behaviour" works instead.
But it's starting to look like I'm going to need to set up the IDF watchdog to handle this is wifi task hanging disables esp_restart. I'm not convinced it does though. The reason being that when the wifi task hung in my app it appeared that the APP core was still working.
John A
Who is online
Users browsing this forum: No registered users and 168 guests