|
|
请问谁静态配置过omapl138的看门狗?
5 ] P7 F7 c2 [" p7 W//*************** Add watchdog **********************//6 @5 t4 \1 K8 q( v: s
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
* O- I+ z1 y2 T* fvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
& I0 r1 W1 y/ l* I0 w
: P* V! A6 O0 h1 |8 J) _& j- P//Puts timer1 in watchdog mode( m) d- D7 ^- @$ v) X, [ a, i
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;5 d' Z3 Q. O4 b1 p7 w1 j# D
Timer.timerSettings[1].master = true;
: n, u3 q3 D9 v, N$ m& M
2 H- ~; V" e# N& I//Instance config parameters for Timer. Y! E- a$ A5 x
var timerParams = new Timer.Params(); //Create a new Timer params struct
, q0 m! ]+ k; s1 S+ |5 a+ ]timerParams.period = 1000; // set to your period value here3 W7 N. I" S( f( k2 n
timerParams.periodType = Timer.PeriodType_MICROSECS; N+ ]" E+ Z, t* Q1 I
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
0 _- [ |9 B4 ]; T4 u/ T$ S2 q) y4 w1 V- \$ I8 D0 n- a4 z; [/ g
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);- G* z [4 h3 t- ^' j
5 B# ]" a# r/ S( a! F5 [: U" Q* }% ^' [" X7 k
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 + n; Q' G/ ^0 @$ m1 `
竟然只支持chain和unchain的。。 请大神指点怎么配置????' g0 M {) n- ^# P' U, m! g
|
|