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

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

[未解决] watchdog配置

[复制链接]

1

主题

1

帖子

17

积分

新手上路

Rank: 1

积分
17
跳转到指定楼层
楼主
发表于 2017-10-25 19:17:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问谁静态配置过omapl138的看门狗?$ ?" F. h: e/ d+ z
//*************** Add watchdog **********************//9 ^2 P! e& i& I0 m. z- [: t
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
) J; \8 y% r' A" c+ a0 yvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");* p- L; p/ u) j& Z0 v3 t5 r

6 V5 Z+ l) ]. G7 b//Puts timer1 in watchdog mode& [8 ]3 K3 d7 m3 F
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;0 e6 @" s1 Y4 d3 G7 u
Timer.timerSettings[1].master = true;* t0 D1 P0 c* k+ ^! l5 ]6 Y

( p% i/ T" G6 X/ o' M  i//Instance config parameters for Timer8 Q4 Y) P5 I% n7 R2 B; m( _
var timerParams = new Timer.Params(); //Create a new Timer params struct. c5 w; A: q& q* [, _  U" B2 [" H$ ?
timerParams.period = 1000;  // set to your period value here2 m9 z; U; ^2 f/ q+ x
timerParams.periodType = Timer.PeriodType_MICROSECS;
6 d- _( p0 H. a) ^! I3 \timerParams.runMode = Timer.RunMode_ONESHOT;  // specify if one shot or continuous mode, N9 Q8 S2 ^# B  h8 i5 W

/ a" D; w# ~  R* Q6 m; l3 i# fProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
7 F) Q* U& C8 W2 c3 U# w6 ~" ~3 y: [( f5 Z
) G7 |! P8 W8 |  X7 F5 v
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
# m* W3 O7 u9 s竟然只支持chain和unchain的。。 请大神指点怎么配置????4 E  U- G1 p2 h, K4 P$ z
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-3 01:39 , Processed in 0.033738 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

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