Page 1 of 1

[answered] feed task watchdog

Posted: Tue Jan 17, 2017 3:28 am
by rudi ;-)
from my desk wrote:
tcpip_task_hdlxxx : 3ffbbf68, prio:18,stack:2048
I (132) wifi: frc2_timer_task_hdl:3ffbda08, prio:22, stack:2048
?[0;32mI (152) phy: error: pll_cal exceeds 2ms!!!?[0m
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: main
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: main
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: main
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: main
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: main
hi
for a test, no hurry:
not sure, how we can feed CPU 0 "task watchdog" by code?
possible?

best wishes
rudi ;-)

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 4:23 am
by WiFive
I worry about this first:

Code: Select all

phy: error: pll_cal exceeds 2ms!!!?

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 7:12 am
by ESP_Sprite
You can't; only the tasks that are watched can do that. In the default case, only the idle tasks are watched, and they will feed the watchdog every time you run. From this, we can conclude that your main task is hogging the CPU (by not doing something like a vTaskDelay, wait for a queue or socket, ... that lets it be descheduled.). Fix that and the watchdog will stop bothering you.

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 8:57 am
by jumjum123
I have a similiar problem.
Aplication is running in main task as fast as possible in an endlessloop.
Means, don't want to spend time for a delay or other kind of block.
There is a seperate task with higher priority, which waits for chars in uart0.
And there is another task with higher priority, waiting for a notification from main task

May sound crazy doing it this way, but it works fine.
But still we have to disable watchdog.
I've in mind calling esp_task_wdt_feed() would not be a good solution.
Any explanation about usage of this function ?

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 9:29 am
by WiFive
jumjum123 wrote:Any explanation about usage of this function ?
https://github.com/espressif/esp-idf/bl ... i/wdts.rst

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 9:41 am
by jumjum123
Thanks, sometimes its good to read the docu :idea:
Since any answer is base for a new question, ..
Is hardware timer group0 blocked by watchdogs, ok will ask this in SDK forum

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 1:19 pm
by rudi ;-)
ESP_Sprite wrote: ..by not doing something like a vTaskDelay, wait for a queue or socket, ... that lets it be descheduled.
.. Fix that and the watchdog will stop bothering you.
Hi Jeroen,
yes you are right, it was a stress test on wait in websvr socket - for a connect from a client

for testing:
menuconfig->Component config->Esp32-specific config -> deaktivate Task watchdog
this deaktivate Task watchdog watches CPU0 idle task then too

the task watchdog timeout ( seconds ) is set standard 5 sec if Task watchdog is aktive.

my test was to do deactivate the Task watchdog and try to feed by code.

i register, there is no possible "bridge code" from CPU1 to CPU0 possible for this after the SoC starts and run?
can we set a CPU0 Register or a CPU1 Register that is read by from CPU0 ?

( hint: xEventGroupClearBits(wifi_event_group, CONNECTED_BIT); )

best wishes
rudi ;-)

Re: [Q] feed task watchdog

Posted: Tue Jan 17, 2017 1:21 pm
by rudi ;-)
WiFive wrote:
jumjum123 wrote:Any explanation about usage of this function ?
https://github.com/espressif/esp-idf/bl ... i/wdts.rst
https://github.com/espressif/esp-idf/bl ... m/wdts.rst

Re: [Q] feed task watchdog

Posted: Wed Jan 18, 2017 2:45 am
by ESP_Sprite
Watchdogs have nothing to do with multicore-capability, all FreeRTOS functions you can use for cross-core communication should still happily be working.