|
|
请问谁静态配置过omapl138的看门狗?3 e" i, w: w3 \1 M3 |" t3 i
//*************** Add watchdog **********************//4 T& u5 ~+ t# B& I
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
, T0 `% o/ B: v( A3 t8 E* m5 ?var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");1 c& b+ O- D9 E8 D8 L# T
$ o2 F& R6 ^( k- J% _% ^//Puts timer1 in watchdog mode
2 g1 A. G; |0 F! RTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;1 S! a# F3 x$ G+ ]) p
Timer.timerSettings[1].master = true;
) I* \4 K: W3 C) M6 B( ~; ?
0 y$ I) s. w/ d; M) ^//Instance config parameters for Timer( O V6 t6 y- x5 [) l! J
var timerParams = new Timer.Params(); //Create a new Timer params struct
9 F; o: m, P# M1 `' c& CtimerParams.period = 1000; // set to your period value here
1 J( ]6 s' \9 ?7 n, ?timerParams.periodType = Timer.PeriodType_MICROSECS;' p0 J# M+ {4 g% I) G; b$ V6 p6 k
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
5 d! y$ F! t* h# J+ d1 c' {$ {
& y, g* }' B3 ?: E9 z! vProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);3 H. d: r0 T, |
5 B/ A0 Q% p; L, n+ y
! G7 f3 p3 L1 s! ?这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
( l6 C8 g& x3 f( L1 v3 ^竟然只支持chain和unchain的。。 请大神指点怎么配置????
( D) ^+ B8 j2 R# n: K( @; J- x |
|