Complete the code to start the FreeRTOS scheduler.
vTaskStartScheduler[1];The function vTaskStartScheduler() starts the RTOS scheduler and requires parentheses even if no arguments are passed.
Complete the code to create a task with FreeRTOS API.
xTaskCreate(TaskFunction, "Task1", 1000, NULL, [1], NULL);
The priority parameter in xTaskCreate is an integer. Here, 1 sets the task priority.
Fix the error in the task delay call to avoid runtime bugs.
vTaskDelay([1]);FreeRTOS expects delay time in ticks. Dividing milliseconds by portTICK_PERIOD_MS converts ms to ticks correctly.
Fill both blanks to correctly check if a queue send was successful.
if (xQueueSend(queue, &data, [1]) == [2]) { /* success */ }
xQueueSend uses portMAX_DELAY to wait indefinitely. It returns pdPASS on success.
Fill all three blanks to create a runtime monitoring hook for stack overflow detection.
void vApplicationStackOverflowHook(TaskHandle_t [1], char *[2]) { [3]; }
vTaskDelete inside the hook may cause issues.The hook receives the task handle xTask and task name pcTaskName. Disabling interrupts with taskDISABLE_INTERRUPTS() prevents further damage.