Page 1 of 1

Task Priority of WiFi

Posted: Sun May 05, 2019 12:42 pm
by LysisofPie
Hey all,

Wondering if anyone can help here.

I've been having a few DNS failures which are due to the WiFi being delayed. Though, I'm a little confused at which priority the WiFi task is actually running at.

I can see in WiFiGeneric.cpp that ESP_TASKD_EVENT_PRIO applies -1 .

In esp_task.h, ESP_TASKD_EVENT_PRIO is equal to configMAX_PRIORITIES and applies - 5.

In FreeRTOSConfig configMAX_PRIORITIES is set to 7 or 25 depending on SMALL_TEST (not sure what this is).

I'm under the impression 7 is maximum from purposely trying to interfere with the WiFi by task priority. This would give a priority 7 - 6 = 1?

This seems very low as many other tasks seem to operate at this level. Am I missing something obvious here?

Thanks in advance..

Re: Task Priority of WiFi

Posted: Wed May 08, 2019 2:12 am
by chegewara
This is pretty old picture, but ass you can see it was priority 23 back then:
https://user-images.githubusercontent.c ... 86cfcd.png

Max priority is 25.

Re: Task Priority of WiFi

Posted: Wed May 08, 2019 10:45 pm
by LysisofPie
Thanks for your help - it seems a fix was released last month which updated the priority from 2 to (ESP_TASKD_EVENT_PRIO -1).

https://github.com/espressif/arduino-es ... 99374f82a5

I've reinstalled my versions, so hopefully... it will fix the issue. Though, I should probably move over to IDF permanently with FreeRTOS.

Cheers,