#define OS_TMR_CFG_TICKS_PER_SEC 1000u /* Rate at which timer management task runs (Hz) */
网络关于定时器的设置参数介绍较少,其实看下官网马上就能知道,这个参数就是分辨率。
https://doc.micrium.com/display/osiidoc/Timer+Management
The resolution of all the timers managed by µC/OS-II is determined by the configuration constant: OS_TMR_CFG_TICKS_PER_SEC
, which is expressed in Hertz (Hz). So, if the timer task (described later) rate is set to 10, all timers have a resolution of 1/10th of a second (ticks in the diagrams to follow). In fact, this is the typical recommended value for the timer task. Timers are to be used with “coarse” granularity.