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

本文介绍了 μC/OS-II 操作系统中定时器管理配置的关键参数 OS_TMR_CFG_TICKS_PER_SEC 的作用及推荐设置。该参数决定了所有由 μC/OS-II 管理的定时器的分辨率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值