Task1, Task2, and Task3.Task1, Task2, and Task3 respectively.Task1, Task2, and Task3.Task1, Task2, and Task3 respectively.Task1, Task2, and Task3. Each function should have the correct FreeRTOS task signature and an infinite loop with no code inside.Each task function must have the signature void TaskName(void *pvParameters) and an infinite loop for(;;).
xTask1Handle, xTask2Handle, and xTask3Handle. Use xTaskCreate to create Task1 with priority 1, Task2 with priority 2, and Task3 with priority 3. Use stack size 100 for all tasks and pass NULL as parameters.Use xTaskCreate with the correct parameters: function, name, stack size, parameters, priority, and handle.
printf statement that prints the task name: "Running Task1\n" in Task1, "Running Task2\n" in Task2, and "Running Task3\n" in Task3. Add a vTaskDelay(1000 / portTICK_PERIOD_MS); after the print to delay 1 second.Use printf to print the task name and vTaskDelay to pause the task for 1 second.
vTaskStartScheduler(); after creating the tasks to start the FreeRTOS scheduler.Call vTaskStartScheduler(); to start running the tasks.
What does priority-based scheduling in FreeRTOS ensure?
Which of the following is the correct way to set a task priority when creating a task in FreeRTOS?
xTaskCreate(TaskFunction, "TaskName", 1000, NULL, ___, &TaskHandle);Given the following FreeRTOS tasks with priorities, which task will run first?
Task A priority = 2
Task B priority = 3
Task C priority = 1
Identify the error in this FreeRTOS task creation code snippet:
BaseType_t result = xTaskCreate(TaskFunc, "Task1", 500, NULL, 0, NULL);
if(result != pdPASS) {
// Handle error
}What is wrong with the priority value?
You have three tasks with priorities 2, 4, and 3. Task with priority 4 is blocked waiting for an event. Which task will FreeRTOS schedule next?
Pass the test and this pattern moves unknown