Priority

Priority Each task is assigned a priority from 0 to (configMAX_PRIORITIES – 1 ), (configMAX_PRIORITIES is defined  in FreeRTOSConfig.h). Low priority numbers denote low priority tasks. The idle task has priority zero (tskIDLE_PRIORITY). The task placed into the Running state by the scheduler is always the highest priority task that is able to run – higher priority tasks […]

Read More

Co-routines

Co-routines are rarely used these days and there are no plans to develop them further in FreeRTOS

Read More

.Tasks general

The basics ESP-IDF uses FreeRTOS and this is a “tasks” based Operating System. The FreeRTOS default tick rate is 100Hz (you can configure this, but 100 is a good tradeoff between ISR overhead and responsiveness). This means portTICK_PERIOD_MS is 10 (10ms per tick). If you use a vTaskDelay < 10mS, it is effectively a 0 […]

Read More

Creating tasks

TaskScheduler vTaskStartScheduler(); //<<<This FreeRTOS call is not required as the scheduler is already started before app_main() call Create New xTask Tasks should never return (i.e. be a continuous loop). xTaskCreate( [pointer to the function which will execute when the task is scheduled to run], [descriptive name for the the task, up to 16 chars, mainly […]

Read More