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

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

[未解决] watchdog配置

[复制链接]

1

主题

1

帖子

17

积分

新手上路

Rank: 1

积分
17
跳转到指定楼层
楼主
发表于 2017-10-25 19:17:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问谁静态配置过omapl138的看门狗?
. W$ r2 T, q4 F9 C* H8 r6 }6 k//*************** Add watchdog **********************//9 G5 P4 ~: x& F! u
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
7 M" s6 a9 K  H- m5 g: z. Vvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");. x. d5 O: P: r0 B. [

& R4 [) ]/ u2 e# L* v* s$ b1 p//Puts timer1 in watchdog mode
+ ^$ j2 y% k% n, G2 Z2 wTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;2 [* X3 Z- h2 Y7 c
Timer.timerSettings[1].master = true;& x- t) W. q- B, T- ~

/ c9 D4 l4 X! I" G0 V//Instance config parameters for Timer
- N% I' M- u* S" S5 c" n$ k9 a; F0 Dvar timerParams = new Timer.Params(); //Create a new Timer params struct
0 B7 l1 W0 U; F. K1 \9 MtimerParams.period = 1000;  // set to your period value here
) i  ^% }  ]; k/ {* a, s  V3 Y- a- ?timerParams.periodType = Timer.PeriodType_MICROSECS;
) k0 O3 @, A4 a! r; H% t, E; JtimerParams.runMode = Timer.RunMode_ONESHOT;  // specify if one shot or continuous mode" z7 T3 G$ p, |+ j5 `+ S
, n! x* `. g! z$ V
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
$ v  ]$ Z+ E) G+ t
; N% O- J( O: @/ f+ f3 ~: k, e
5 w4 ^2 U( s8 B9 ?6 o这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
/ ^0 n. M, ~' n竟然只支持chain和unchain的。。 请大神指点怎么配置????
; U. X6 y& [6 v3 m
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-25 14:58 , Processed in 0.034369 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

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