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

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

[未解决] watchdog配置

[复制链接]

1

主题

1

帖子

17

积分

新手上路

Rank: 1

积分
17
跳转到指定楼层
楼主
发表于 2017-10-25 19:17:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问谁静态配置过omapl138的看门狗?3 l+ t" g4 ]+ H' v- m- E# K% N
//*************** Add watchdog **********************//
0 f7 D  D1 I# F: a* U7 jvar Clock = xdc.useModule("ti.sysbios.knl.Clock");6 l# _- V8 b( O" B$ i- |8 D
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");- x' e0 o' E6 @$ e! i6 q
3 w6 z, H. _5 u
//Puts timer1 in watchdog mode' @* x6 O  D9 y' G6 U$ u
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
) |$ _$ F2 l5 p2 ?: @Timer.timerSettings[1].master = true;
: L4 W# a; v$ O7 G. a1 ~4 n/ I7 w" T& Z9 {  o  E, H
//Instance config parameters for Timer8 T! a) H- l) g* n8 L; A
var timerParams = new Timer.Params(); //Create a new Timer params struct3 K$ v4 S1 c0 E7 g
timerParams.period = 1000;  // set to your period value here9 s* A, I! n4 f/ t& D5 F
timerParams.periodType = Timer.PeriodType_MICROSECS;
0 i" f: f. q* |timerParams.runMode = Timer.RunMode_ONESHOT;  // specify if one shot or continuous mode
9 f. B+ f, C' ^; a! S* f$ W
0 N( i6 R3 a0 C8 W4 aProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);5 e& J% @" I) k) l4 R
' n  c6 g( k( T, Z6 v2 O3 r
8 M! z0 H2 X2 h3 U# G* S
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 - h( R3 W) c9 v- r3 K# L
竟然只支持chain和unchain的。。 请大神指点怎么配置????
% p; L" |7 |; ?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-16 15:10 , Processed in 0.035572 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

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