watchdog配置 - OMAP-L138 - 嵌入式开发者社区 - 51ele.net
设为首页收藏本站
点击跳转“创龙科技服务通”

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

[未解决] watchdog配置

[复制链接]

1

主题

1

帖子

17

积分

新手上路

Rank: 1

积分
17
跳转到指定楼层
楼主
发表于 2017-10-25 19:17:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问谁静态配置过omapl138的看门狗?
! V5 K" w$ p' s+ {//*************** Add watchdog **********************//
3 ~( l3 x, Q# Q% q2 `  cvar Clock = xdc.useModule("ti.sysbios.knl.Clock");
) q) V5 W0 p* I% P2 w+ X* Jvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
, t. W  O6 X3 ]
1 S- u+ p) d3 n9 l5 P, B3 V0 G//Puts timer1 in watchdog mode
8 u2 t2 l) H5 {5 C+ LTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;. G# t' X- J# o" n$ J6 B4 ~& H; c
Timer.timerSettings[1].master = true;
- ]8 s7 @% B4 i- g6 a
) O7 M( i3 R1 t//Instance config parameters for Timer0 A! w+ b' O* X- ^4 R
var timerParams = new Timer.Params(); //Create a new Timer params struct
5 `' N6 o8 ~8 E4 v7 o1 E% ?# T) OtimerParams.period = 1000;  // set to your period value here% u4 r- L" R  K/ n0 q2 o0 S
timerParams.periodType = Timer.PeriodType_MICROSECS;
5 r3 W' f2 Y' w/ f' s$ a; ftimerParams.runMode = Timer.RunMode_ONESHOT;  // specify if one shot or continuous mode, m5 I/ t) A6 b) U/ D( r
$ j' b, B% }4 _2 m/ G: q  d* g
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
" q/ Z* S: v. U! ~8 Z, ~5 M' b" d1 Q+ H" h) V" c3 _
, [3 Z. P7 _6 }. E& M( x
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
7 z' K5 M2 U1 r5 P5 f竟然只支持chain和unchain的。。 请大神指点怎么配置????
+ |+ s6 m3 ^) d4 v5 F6 {, C
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

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

本版积分规则

点击跳转“创龙科技服务通”

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

GMT+8, 2026-3-17 07:48 , Processed in 0.037096 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

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