0
0
FreeRTOSprogramming~10 mins

Why runtime monitoring catches RTOS bugs in FreeRTOS - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start the FreeRTOS scheduler.

FreeRTOS
vTaskStartScheduler[1];
Drag options to blanks, or click blank then click option'
A()
B;
C{}
D[]
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting parentheses causes a syntax error.
2fill in blank
medium

Complete the code to create a task with FreeRTOS API.

FreeRTOS
xTaskCreate(TaskFunction, "Task1", 1000, NULL, [1], NULL);
Drag options to blanks, or click blank then click option'
A0
BvTaskStartScheduler
C1
DNULL
Attempts:
3 left
💡 Hint
Common Mistakes
Using NULL or zero may create a task with no priority.
3fill in blank
hard

Fix the error in the task delay call to avoid runtime bugs.

FreeRTOS
vTaskDelay([1]);
Drag options to blanks, or click blank then click option'
A1000 * portTICK_PERIOD_MS
B1000 / portTICK_PERIOD_MS
C1000
DportTICK_PERIOD_MS
Attempts:
3 left
💡 Hint
Common Mistakes
Using raw milliseconds causes incorrect delays and timing bugs.
4fill in blank
hard

Fill both blanks to correctly check if a queue send was successful.

FreeRTOS
if (xQueueSend(queue, &data, [1]) == [2]) { /* success */ }
Drag options to blanks, or click blank then click option'
AportMAX_DELAY
BpdPASS
C0
DpdFAIL
Attempts:
3 left
💡 Hint
Common Mistakes
Using zero timeout causes immediate failure if queue is full.
5fill in blank
hard

Fill all three blanks to create a runtime monitoring hook for stack overflow detection.

FreeRTOS
void vApplicationStackOverflowHook(TaskHandle_t [1], char *[2]) {
    [3];
}
Drag options to blanks, or click blank then click option'
AxTask
BpcTaskName
CtaskDISABLE_INTERRUPTS()
DvTaskDelete(xTask)
Attempts:
3 left
💡 Hint
Common Mistakes
Calling vTaskDelete inside the hook may cause issues.