ucos ii 定时器 1ms 不成功总结

#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.

发布了21 篇原创文章 · 获赞 3 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/fafactx/article/details/81942522
今日推荐