I have taking an online course on real time systems where FreeRTOS is used to demonstrate the various functionalities of an RTOS. The problem I am facing right now is as follows:
- There are two tasks (A and B) created in the main function and the real time scheduler is started.
- The task B has a lower priority than task A. Task B needs to be given scheduled every n ms but since the priority of task A is higher than that of B, B does not get scheduled every n ms.
- So, we need to write a new function that takes the task handles of A and B and measures the execution time of task B.
- If the execution time of B is more than n ms, it increases the priority.
I understood the functionality of the function to increase the priority but could not understand how to measure the task execution time. The problem specifically asks us to use the vApplicationTickHook( void ) function to do so. Any hint would be appreciated. I posted in the course's discussion forum as well but didn't get any reply, hence posted here.
n
, the priority of A needs to be increased? – Weather Vane