[answered] feed task watchdog

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

[answered] feed task watchdog

Postby rudi ;-) » Tue Jan 17, 2017 3:28 am

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 ;-)
Last edited by rudi ;-) on Wed Jan 18, 2017 12:01 pm, edited 2 times in total.
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: [Q] feed task watchdog

Postby WiFive » Tue Jan 17, 2017 4:23 am

I worry about this first:

Code: Select all

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

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

Re: [Q] feed task watchdog

Postby ESP_Sprite » Tue Jan 17, 2017 7:12 am

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.

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

Re: [Q] feed task watchdog

Postby jumjum123 » Tue Jan 17, 2017 8:57 am

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 ?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: [Q] feed task watchdog

Postby WiFive » Tue Jan 17, 2017 9:29 am

jumjum123 wrote:Any explanation about usage of this function ?
https://github.com/espressif/esp-idf/bl ... i/wdts.rst

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

Re: [Q] feed task watchdog

Postby jumjum123 » Tue Jan 17, 2017 9:41 am

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

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: [Q] feed task watchdog

Postby rudi ;-) » Tue Jan 17, 2017 1:19 pm

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: [Q] feed task watchdog

Postby rudi ;-) » Tue Jan 17, 2017 1:21 pm

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
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

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

Re: [Q] feed task watchdog

Postby ESP_Sprite » Wed Jan 18, 2017 2:45 am

Watchdogs have nothing to do with multicore-capability, all FreeRTOS functions you can use for cross-core communication should still happily be working.

Who is online

Users browsing this forum: uday.sriranga and 224 guests