Task watchdog and lwip

Reiner1210
Posts: 39
Joined: Tue Mar 20, 2018 6:28 pm

Task watchdog and lwip

Postby Reiner1210 » Mon Mar 11, 2019 9:29 pm

Hello,

if I have a task reading or writing in a loop do I need insert a vTaskDelay() to trigger the idle task? Or is this done indirect by the lwip library ?

Regards
Reiner

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

Re: Task watchdog and lwip

Postby ESP_Sprite » Tue Mar 12, 2019 7:36 am

I assume you read or write to a network socket? If so: Reading blocks (de-schedules the current task and lets others do their job) while waiting for data. Writes will *probably* block; theoretically, if you can write as fast as the network layer can send it, they may not. That's unlikely to be the case, however.

Reiner1210
Posts: 39
Joined: Tue Mar 20, 2018 6:28 pm

Re: Task watchdog and lwip

Postby Reiner1210 » Wed Mar 13, 2019 9:09 am

Hello,

Yes I have a Webserver (my own code) which can deliver data from SD card and write to it. Also OTA updates are handled. If reading long files or writing long files it can be several sec before it finishes. I have done a test and register handlers via esp_register_freertos_idle_hook_for_cpu and seen that they are called even without vTaskDelay calls.

By the way: Is a vTaskDelay(1) enough for the idle task to get triggered ?

Who is online

Users browsing this forum: Google [Bot], pkf1111 and 167 guests