Complete the code to create a task with priority 2.
xTaskCreate(taskFunction, "Task1", 1000, NULL, [1], NULL);
The priority parameter sets the task priority. Here, 2 is the correct priority.
Complete the code to start the FreeRTOS scheduler.
int main(void) {
// Setup code
[1]();
while(1) {}
}xTaskCreate instead of starting the scheduler.vTaskStartScheduler() starts the FreeRTOS scheduler to run tasks based on priority.
Fix the error in the task priority assignment.
xTaskCreate(taskFunction, "Task2", 1000, NULL, [1], NULL);
configMAX_PRIORITIES.Task priority must be less than configMAX_PRIORITIES. The highest valid priority is configMAX_PRIORITIES - 1.
Fill both blanks to create a task and set its priority to 3.
xTaskCreate([1], "Task3", 1000, NULL, [2], NULL);
The task function is taskFunction3 and the priority is 3 as requested.
Fill all three blanks to create a task with priority 4 and start the scheduler.
xTaskCreate([1], "Task4", 1000, NULL, [2], NULL); [3]();
The task function is taskFunction4, priority is 4, and the scheduler is started with vTaskStartScheduler().
