Complete the code to set the highest priority for a critical task.
xTaskCreate(taskFunction, "Task1", 1000, NULL, [1], NULL);
The highest priority in FreeRTOS is configMAX_PRIORITIES - 1 because priorities start at 0.
Complete the code to create a low priority background task.
xTaskCreate(backgroundTask, "BGTask", 500, NULL, [1], NULL);
Priority 0 is the lowest priority in FreeRTOS, suitable for background tasks.
Fix the error in setting task priority to avoid invalid priority assignment.
xTaskCreate(myTask, "MyTask", 256, NULL, [1], NULL);
Task priority must be less than configMAX_PRIORITIES. Using configMAX_PRIORITIES - 1 is valid.
Fill both blanks to create a medium priority task that runs periodically.
xTaskCreate([1], "PeriodicTask", 512, NULL, [2], NULL);
The task function is periodicTaskFunction and priority 5 is a medium priority.
Fill all three blanks to create a task with a custom stack size, priority, and name.
xTaskCreate([1], [2], [3], NULL, 3, NULL);
The task uses customTaskFunction, named "CustomTask", with a stack size of 1024.