Time Slice in "Ticks" - Pg.41

groufosse wrote on Friday, 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?


richard_damon wrote on Saturday, 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.