Time Slice in "Ticks" - Pg.41
Posted by rog57
on December 21, 2012
On pg.41 of the "Practical Guide...", Test frame 1 describes a continuous task which runs for a "complete tick period". I'm trying to grasp the concept of continuously. If you set a task to run continuously, what is the "complete tick period"? Is that the period we define upon creating the task? It also says the print task could run many times in this interval - but wouldn't that be the case only if tick_period_interval > duty_cycle of the task?
RE: Time Slice in "Ticks" - Pg.41
Posted by Richard Damon
on December 22, 2012
A continuous task is a task that does not block, but just keeps running. Such a task will starve any tasks at a lower priority level (so such tasks tend to be put at priority level 0) and will run until the next timer tick occurs, and then FreeRTOS will switch to any other ready tasks at the same priority level. If you have several tasks like this, then generally they will run in a round robin, first one task running for one timer tick, then the next for a timer tick, and so on until each has a turn, then returning to the first task for a timer tick.
If during this cycle another task, of higher priority, becomes ready, either due to the actions of an interrupt handler, or from the currently running task, then that task will be switched to, let run, and then when it eventually blocks, the flow returns to the task that was interrupted.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.