I know that each task in FreeRTOS should have a vTaskDelay() to release CPU resource to other tasks periodically. However, when there is a very time-consuming function in a task, like read a large amount of data from a slow device, other lower priority tasks need to wait a long time. According to my understanding, even I have added delay after this 'heavy' function, lower priority tasks still need to wait a long time before vTaskDelay() is executed. How can other lower priority tasks have the opportunity to use CPU resource while the priority of this 'heavy' task keeps unchanged?
void vTask()
{
while(1){
func_heavy(); //this function take a lot of time
vTaskDelay();
}
}