|
|
请问谁静态配置过omapl138的看门狗?+ t0 y( o5 C1 C5 u' t9 y4 Q1 g
//*************** Add watchdog **********************//! G2 f+ A7 a( C) x* @' X( f
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
" q& x/ H* I. L* Xvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
% G- s/ }9 f) a& v
3 e5 T/ x. b3 j- g//Puts timer1 in watchdog mode) ?% G9 i4 {6 w& r3 F ]+ ^, N
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;$ F5 e2 ]0 T- O5 {; D/ u( \, J" H8 J
Timer.timerSettings[1].master = true;) ^0 @: C; ?1 ? Q
+ e$ w0 R" w+ y6 K! C
//Instance config parameters for Timer/ d8 U- h" E$ Q! X$ {, E
var timerParams = new Timer.Params(); //Create a new Timer params struct L! X1 \& U' N2 l) a4 e6 B, G
timerParams.period = 1000; // set to your period value here" q- d, a% Y6 K t
timerParams.periodType = Timer.PeriodType_MICROSECS;' g0 }: S5 G8 D% M
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode" Y, n7 [8 T9 R+ q: j0 z8 ?! w. W
5 j( e. q' I" ^ ?3 v0 U! K
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);( L8 Y* T* L$ O6 k) d y
7 @( w& W9 j% t* c% m
* o& r4 G: d; V* K1 U2 h这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 / `. J2 _- Q: @
竟然只支持chain和unchain的。。 请大神指点怎么配置????
3 z* @1 h9 K: M& m; u |
|