Page 1 of 1

Whatchdog got triggered error between web radio and aws tasks

Posted: Thu Sep 03, 2020 7:34 am
by nicola
Dear All,
I have again a probem with the "whatchdog got triggered" in an application running two tasks.
I know there is something which is blocking my mp3_task as I had in my previous post here:

https://www.esp32.com/viewtopic.php?f=2&t=9846

Now the situation is a bit different since I cant figure out any semaphore or something similar which is blocking my mp3_task.
I have 2 tasks:

Code: Select all

xTaskCreatePinnedToCore(&aws_iot_task_send_data, "aws_iot_task_send_data", 9216, NULL, 11, xHandle, 1);
[/b]
[/b]xTaskCreatePinnedToCore(&http_get_task, "http_get_task", 2560, config, 20,
NULL, 0);

The first task simply uses the aws iot sdk to connect to my aws account and make some MQTT pubblications and subscriptions as you can see in this link: https://github.com/espressif/esp-aws-iot
The seconds makes radio streaming by using this example here: https://github.com/MrBuddyCasino/ESP32_MP3_Decoder
They indipendently are working but when I put all together it seems the line of code , or something similar, :

Code: Select all

c = aws_iot_mqtt_yield(&client, 100);
in my first task ,is starving the mp3_task which cannot stream the radio.
I also tried to move the first task to the other CPU core but the problem is still the same.
This is my error:

E (1027821) task_wdt: Task watchdog got triggered. The following tasks did not r
eset the watchdog in time:
E (1027821) task_wdt: - IDLE1 (CPU 1)
E (1027821) task_wdt: Tasks currently running:
E (1027821) task_wdt: CPU 0: wifi
E (1027821) task_wdt: CPU 1: mp3_decoder_tas



Could you please suggest a way to make this task working together ?
Hope you can help.
Thanks a lot
Nicola

Re: Whatchdog got triggered error between web radio and aws tasks

Posted: Thu Sep 03, 2020 8:30 pm
by ESP_Sprite
This means that core 1 is never idle; something that can happen if the process on that core is either looping (which is bad) or has an actual good reason to run all the time (which is better). Are you sure your MP3 decoder isn't just e.g. dumping its audio into some infinite sink, running its legs out trying to decode the input as quickly as it can?