Lesson 5: Part 2: SysTick Timer - Building Operating System

As promise, we will be doing some real work here, making our first Operating System - task scheduler function.

The task scheduler that perform round-robin with no priority. Each task will have a task timer count which get decrement. And when the timer count reach zero, the task is ready to be executed. There will be no preemptive function and thus each task that executed should not have an infinite loop that occupied CPU time indefinitely. This is just a brief explanation of the task scheduler in action as the main focus here is on the SysTick.

Below is the snapshot of the code on the task scheduler.

Structure Defining Task Called Interval and Task Pointer
SysTick Timer Interrupt That Decrement Task Delay


Called Task Upon Task Delay Timeout
Again, the above complete source code has been uploaded into github.

No comments:

Post a Comment