watchdog配置 - OMAP-L138 - 嵌入式开发者社区 - 51ele.net
设为首页收藏本站

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 5101|回复: 0
打印 上一主题 下一主题

[未解决] watchdog配置

[复制链接]

1

主题

1

帖子

17

积分

新手上路

Rank: 1

积分
17
跳转到指定楼层
楼主
发表于 2017-10-25 19:17:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问谁静态配置过omapl138的看门狗?/ C: G* @. z2 y- y8 E6 B5 V
//*************** Add watchdog **********************//
/ }  R/ T; f* W3 f2 |! k( ]var Clock = xdc.useModule("ti.sysbios.knl.Clock");# J3 i: f' l" Z2 t1 a5 @/ k1 M( U
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");, _5 E5 ?- f9 N% y& Z8 G

4 v4 f, d; m- P/ J# y//Puts timer1 in watchdog mode) w( z; J: `' ?' g
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;* a5 O3 ^3 m  _# j$ U; D& G
Timer.timerSettings[1].master = true;6 ~) s- d1 D! {" }3 V0 E

, u) v5 }2 S+ ?( J+ b- K  D//Instance config parameters for Timer( L* q" P4 V( V( [+ n: f& \
var timerParams = new Timer.Params(); //Create a new Timer params struct; q: c$ R9 w. M: n& r& m
timerParams.period = 1000;  // set to your period value here; I& x/ R, G) N. b) z; w- T
timerParams.periodType = Timer.PeriodType_MICROSECS;
1 V2 R! N4 a* N- w; {1 [' ~timerParams.runMode = Timer.RunMode_ONESHOT;  // specify if one shot or continuous mode5 V5 Y$ f$ f1 ^. U9 H- V! m' {, J
9 i; g+ _9 O( F/ V! R, \/ T2 f
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);) L& G/ C# J8 `" T' R+ k( r0 Q. N
- u: r3 U8 G& d
+ j2 H& g" O7 h
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 ( z$ W/ J& y% Z" _
竟然只支持chain和unchain的。。 请大神指点怎么配置????
* g: u& s) ?, U! F, C% }9 z
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|嵌入式开发者社区 ( 粤ICP备15055271号

GMT+8, 2025-11-3 17:15 , Processed in 0.034443 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

快速回复 返回顶部 返回列表