Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Read through the FreeRTOS documentation (http://www.freertos.org) and answer the

ID: 1766095 • Letter: R

Question

Read through the FreeRTOS documentation (http://www.freertos.org) and answer the following questions. a. What is the required prototype for all "task" functions? b. Which has a higher priority, a task with priority "1" or priority "2"? c. Priority "O" tasks are special in that they interact with the idle task. What is the idle task and what does it do? Say you only have one task ready and it has a priority of 0 and could use as much CPU as was available. What percent of the time would it run? d. What does the vTaskDelay)function do? Your answer should include the terms "Ready" and "Blocking" e. What does the vTaskDelayUntil()do? How does it differ from vTaskDelay()

Explanation / Answer

a) Required prototype for all "task" functions

b)A task with priority 1 has higher priority.

c) The idle task is created automatically when the RTOS scheduler is started to ensure there is always at least one task that is able to run.

The idle task is responsible for freeing memory allocated by the RTOS to tasks that have since been deleted. It is therefore important in applications that make use of the vTaskDelete() function to ensure the idle task is not starved of processing time.

It will run 100% of time.

d)vTaskDelay() specifies a time at which the task wishes to unblock relative to the time at which vTaskDelay() is called. i.e, it is blocking the task for that much time after the task is called & after delay time it makes the task ready for execution.

e) vTaskUntil() delay a task until a specified time. This function can be used by periodic tasks to ensure a constant execution frequency.

It differs from vTaskDelay in

vTaskDelay() specifies a time at which the task wishes to unblock relative to the time at which vTaskDelay() is called, whereas vTaskDelayUntil() specifies an absolute time at which the task wishes to unblock.