打印
[Kinetis]

Keil rtx 的OSTimeTick

[复制链接]
924|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
hufa123|  楼主 | 2015-10-23 08:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
keil, ST, ic, os, TI
以前用工LPC的ucos 这个需要在中断中调用,用飞思卡尔用keil自带的系统,不需要调用吗?
是不是在头文件中已经自带包含了?有用过的指点下,那个系统资料好少
#ifndef OS_SYSTICK
#define OS_SYSTICK     1
#endif
//
//   <o>RTOS Kernel Timer input clock frequency [Hz] <1-1000000000>
//   <i> Defines the input frequency of the RTOS Kernel Timer.  
//   <i> When the Cortex-M SysTick timer is used, the input clock
//   <i> is on most systems identical with the core clock.
#ifndef OS_CLOCK
#define OS_CLOCK       12000000
#endif

//   <o>RTX Timer tick interval value [us] <1-1000000>
//   <i> The RTX Timer tick interval value is used to calculate timeout values.
//   <i> When the Cortex-M SysTick timer is enabled, the value also configures the SysTick timer.
//   <i> Default: 1000  (1ms)
#ifndef OS_TICK
#define OS_TICK        1000
#endif

// </h>

// <h>System Configuration
// =======================
//
// <e>Round-Robin Thread switching
// ===============================
//
// <i> Enables Round-Robin Thread switching.
#ifndef OS_ROBIN
#define OS_ROBIN       1
#endif

//   <o>Round-Robin Timeout [ticks] <1-1000>
//   <i> Defines how long a thread will execute before a thread switch.
//   <i> Default: 5
#ifndef OS_ROBINTOUT
#define OS_ROBINTOUT   5
#endif

// </e>

// <e>User Timers
// ==============
//   <i> Enables user Timers
#ifndef OS_TIMERS
#define OS_TIMERS      1


用定时器1来控制节拍,在程序无需要去初始化定时器1?中断服务程序要不要调用OSTimeTick?

相关帖子

沙发
FSL_TICS_Jeremy| | 2015-10-23 13:40 | 只看该作者
建议楼主可到以ARM官网查找RTOS相关的介绍,以uCOS,FreeRTOS类推,OSTimeTick表示systick timer,OS_CLOCK表示其时钟源,OS_TICK表示中断发生频率

使用特权

评论回复
板凳
Micachl| | 2015-10-23 21:00 | 只看该作者
当然需要啊,必须在OSinit调用之后才能初始化定时器1

使用特权

评论回复
地板
Micachl| | 2015-10-23 21:01 | 只看该作者
OSTimeTick是在定时器中断服务程序中调用的

使用特权

评论回复
5
Beckham_Owen| | 2015-10-23 22:11 | 只看该作者
这个OStick中断必须在OSinIT初始化之后才能调用,否则系统会崩溃

使用特权

评论回复
6
quray1985| | 2015-10-24 16:31 | 只看该作者
不管是什么硬件系统,这个ostimetick肯定是调用的

使用特权

评论回复
7
ccw1986| | 2015-10-24 16:55 | 只看该作者
这个必须有,如果没有就不是ucos了

使用特权

评论回复
8
西门扫雪| | 2015-10-25 21:11 | 只看该作者
这个定时器中断是给ucos ii提供时钟用的

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

186

主题

393

帖子

2

粉丝