|
请问谁静态配置过omapl138的看门狗?; H9 ?; b9 L/ |9 \# g
//*************** Add watchdog **********************//
7 a7 A5 B/ f2 A% M0 d1 [, Bvar Clock = xdc.useModule("ti.sysbios.knl.Clock");% k! t' M) X7 n# M( S0 |2 r$ {2 Q
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
$ F$ n( J v6 R) i- r, O+ I: E* v3 j
$ G- N+ G7 T( k' E- t: {8 S3 Q- t//Puts timer1 in watchdog mode! M; F6 F4 q0 T: n' _
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
& X/ S4 N3 }9 S; ^8 ^7 NTimer.timerSettings[1].master = true;( t7 d- \9 E8 Q/ P( w2 l) V2 r
" T2 U; G3 e, C//Instance config parameters for Timer
) W& q0 q l1 z+ @$ N* Dvar timerParams = new Timer.Params(); //Create a new Timer params struct3 f& w% {3 W. j. @0 o
timerParams.period = 1000; // set to your period value here3 d1 |8 V1 ^/ p% W& @/ d& f% \+ f
timerParams.periodType = Timer.PeriodType_MICROSECS;
1 G. ~5 @0 l% P0 X0 BtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode/ n4 C6 U" D' O
. `- R- P; O" f$ n* ~# K) t
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);& _+ W2 P' ? [5 t2 H
" K) E! n c; f+ p+ n1 v9 w
5 ^5 \3 v0 `3 q: I这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 6 B, i2 A& G5 y9 e) `; O
竟然只支持chain和unchain的。。 请大神指点怎么配置????1 J/ v D- j1 `! b& \: w1 v; k3 U
|
|