|
|
请问谁静态配置过omapl138的看门狗?, a& c) e7 o& V9 m( D, Z A& w& h. A! \
//*************** Add watchdog **********************//
" G" \; d1 q [: J5 a* Nvar Clock = xdc.useModule("ti.sysbios.knl.Clock");4 p# R# ? X' D
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
7 s$ A8 y- e' I* ]
( ^% r7 K5 H: o( g//Puts timer1 in watchdog mode
2 w X3 U* y" @; m- ~* g+ k/ i* BTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
. E5 w7 D+ k6 T: i9 Y& E5 g- LTimer.timerSettings[1].master = true;0 A/ L" R4 p0 `2 p: B. d4 H
8 K7 F% t D. I# f5 Y" m
//Instance config parameters for Timer
# t ?+ Z* N4 _& f, {- Pvar timerParams = new Timer.Params(); //Create a new Timer params struct
6 n$ Y6 X5 _3 x1 w; F: ItimerParams.period = 1000; // set to your period value here; x/ }# c: z, [5 T$ p H
timerParams.periodType = Timer.PeriodType_MICROSECS;! z" d) f. y2 i( {7 v
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode8 a# E0 I; o7 n" _* X* f0 Q0 ]
, f% p$ s3 Z+ v" T" ]: rProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
. n7 P5 t) H2 a9 N e& J2 u6 d) f: M
+ }8 R) J) Q0 Z# z这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
% E9 f* L) f) J i; n竟然只支持chain和unchain的。。 请大神指点怎么配置????$ b; l5 _; h' s+ V+ W7 |+ l$ P
|
|