Page 1 of 1
Task watchdog and lwip
Posted: Mon Mar 11, 2019 9:29 pm
by Reiner1210
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
Re: Task watchdog and lwip
Posted: Tue Mar 12, 2019 7:36 am
by ESP_Sprite
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.
Re: Task watchdog and lwip
Posted: Wed Mar 13, 2019 9:09 am
by Reiner1210
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 ?