嵌入式开发者社区

标题: watchdog配置 [打印本页]

作者: aacmeme    时间: 2017-10-25 19:17
标题: watchdog配置
请问谁静态配置过omapl138的看门狗?+ T& I6 f0 p3 i' D1 L
//*************** Add watchdog **********************//- d9 M  k! a- s7 y* M( l9 B$ `
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
9 l$ q5 N5 f4 T% P; ivar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");' C8 d# J7 {1 s) u2 C7 ]

- j# N, N: m, X. Z1 n% M/ q//Puts timer1 in watchdog mode8 S% Y! f; b8 h! e5 ]! H6 J
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
& K. C- n& s- @0 _% {$ A! ITimer.timerSettings[1].master = true;" D% S5 i2 T! b' k

& ?) _! L% j1 y( z//Instance config parameters for Timer
2 f; f2 ?' `9 |$ G6 S, `0 D. E4 R' Bvar timerParams = new Timer.Params(); //Create a new Timer params struct
" S" T$ U/ d. S+ Q5 Q2 v6 a) wtimerParams.period = 1000;  // set to your period value here9 j7 ~- L2 {. u2 y: u, h- c3 x3 j
timerParams.periodType = Timer.PeriodType_MICROSECS;, ?) A% N6 C- j  V
timerParams.runMode = Timer.RunMode_ONESHOT;  // specify if one shot or continuous mode
4 b0 Z! {; T* W" i9 L
& k$ N* \  K- L( r2 `2 O8 b! _2 g5 rProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);' j  S8 O1 U1 U
  h$ E# Q) c! M. ~1 ~7 T; k
1 t  Q5 b& F) _- F$ e; ~4 \
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 * L$ r/ G3 |* H3 l# X5 \
竟然只支持chain和unchain的。。 请大神指点怎么配置????
, P  }/ _. U& x! a4 h




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4