|
|
请问谁静态配置过omapl138的看门狗?
! V5 K" w$ p' s+ {//*************** Add watchdog **********************//
3 ~( l3 x, Q# Q% q2 ` cvar Clock = xdc.useModule("ti.sysbios.knl.Clock");
) q) V5 W0 p* I% P2 w+ X* Jvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
, t. W O6 X3 ]
1 S- u+ p) d3 n9 l5 P, B3 V0 G//Puts timer1 in watchdog mode
8 u2 t2 l) H5 {5 C+ LTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;. G# t' X- J# o" n$ J6 B4 ~& H; c
Timer.timerSettings[1].master = true;
- ]8 s7 @% B4 i- g6 a
) O7 M( i3 R1 t//Instance config parameters for Timer0 A! w+ b' O* X- ^4 R
var timerParams = new Timer.Params(); //Create a new Timer params struct
5 `' N6 o8 ~8 E4 v7 o1 E% ?# T) OtimerParams.period = 1000; // set to your period value here% u4 r- L" R K/ n0 q2 o0 S
timerParams.periodType = Timer.PeriodType_MICROSECS;
5 r3 W' f2 Y' w/ f' s$ a; ftimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode, m5 I/ t) A6 b) U/ D( r
$ j' b, B% }4 _2 m/ G: q d* g
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
" q/ Z* S: v. U! ~8 Z, ~5 M' b" d1 Q+ H" h) V" c3 _
, [3 Z. P7 _6 }. E& M( x
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
7 z' K5 M2 U1 r5 P5 f竟然只支持chain和unchain的。。 请大神指点怎么配置????
+ |+ s6 m3 ^) d4 v5 F6 {, C |
|