Bird
0
0

Which of the following is the correct way to create a task in FreeRTOS?

easy📝 Syntax Q12 of 15
FreeRTOS - RTOS Fundamentals
Which of the following is the correct way to create a task in FreeRTOS?
Atask_create(TaskFunction, StackSize);
BCreateTask(TaskFunction, Priority);
CxTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle);
DStartTask(TaskFunction, "TaskName");
Step-by-Step Solution
Solution:
  1. Step 1: Recall FreeRTOS task creation syntax

    The correct function is xTaskCreate with parameters: function, name, stack size, parameters, priority, and handle.
  2. Step 2: Check options for exact match

    Only xTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle); matches the correct FreeRTOS API call syntax.
  3. Final Answer:

    xTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle); -> Option C
  4. Quick Check:

    Use xTaskCreate with full parameters = xTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle); [OK]
Quick Trick: Remember xTaskCreate needs 6 parameters [OK]
Common Mistakes:
  • Using incorrect function names
  • Omitting required parameters
  • Confusing task creation with starting tasks

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes