...
OS_TmrTask()
is a task created by µC/OS-III (assumes setting OS_CFG_TMR_EN
to DEF_ENABLED
in os_cfg.h
) and its priority is configurable by the user through µC/OS-III’s configuration file os_cfg_app.h
(see OS_CFG_TMR_TASK_PRIO
). OS_TmrTask()
is typically set to a medium priority.
As of V3.07, OS_TmrTask()
is a periodic task and uses the same interrupt source used to generate clock ticks. However, timers are generally updated at a slower rate (i.e., typically 10 Hz or so) and thus, the timer tick rate is divided down in software. If the tick rate is 1000 Hz and the desired timer rate is 10 Hz then the timer task will be signaled every 100th tick interrupt as shown in the figure below. no longer runs periodically. It now supports dynamic timer management, which is to say it only runs when it needs to process a change to the timer list. During normal operation, the task determines which timer will timeout next and performs a delay for that length of time. This approach helps reduce power consumption and is better suited to low-power applications, where a periodic wake-up is often undesireable.
The figure below shows timing diagram associated with the timer management task.
...