Recall & Review
beginner
What is the correct signature of a FreeRTOS task function?
A FreeRTOS task function must return void and take a single void pointer parameter. Example:
void TaskName(void *pvParameters)
Click to reveal answer
beginner
Why does a FreeRTOS task function take a void pointer as a parameter?
The void pointer allows passing any type of data to the task when it starts, making the task flexible to receive different inputs.
Click to reveal answer
beginner
Can a FreeRTOS task function return a value?
No, a FreeRTOS task function must have a void return type because tasks run indefinitely or until deleted, and the scheduler does not expect a return value.
Click to reveal answer
intermediate
What happens if a FreeRTOS task function does not include an infinite loop?
If the task function returns (exits), the task is deleted automatically by the scheduler, which can cause unexpected behavior if not intended.Click to reveal answer
beginner
Show an example of a minimal FreeRTOS task function signature and body.
void MyTask(void *pvParameters) {
for (;;) {
// Task code here
}
}Click to reveal answer
What is the return type of a FreeRTOS task function?
✗ Incorrect
FreeRTOS task functions must return void because the scheduler does not expect any return value.
What parameter type does a FreeRTOS task function accept?
✗ Incorrect
The task function accepts a void pointer to allow passing any type of data.
What happens if a FreeRTOS task function returns instead of looping forever?
✗ Incorrect
If the task function returns, the task is deleted by the scheduler.
Which of these is a correct FreeRTOS task function signature?
✗ Incorrect
The correct signature is void return type with a void pointer parameter.
Why is the parameter of a FreeRTOS task function a void pointer?
✗ Incorrect
A void pointer allows passing any type of data to the task.
Describe the required signature of a FreeRTOS task function and explain why it is designed that way.
Think about how tasks receive data and how the scheduler manages them.
You got /4 concepts.
Explain what happens if a FreeRTOS task function finishes execution and returns instead of looping forever.
Consider the lifecycle of a task in FreeRTOS.
You got /3 concepts.