|
请问谁静态配置过omapl138的看门狗?' S$ L: D7 R* i6 g9 u A
//*************** Add watchdog **********************//
+ H% x6 z2 R5 q7 M3 svar Clock = xdc.useModule("ti.sysbios.knl.Clock");
# C# n- p4 l9 {+ L/ \var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
8 H) _! v) X) m( p. R8 G" p
+ D4 I& j4 J7 D! C3 q) N, t+ }//Puts timer1 in watchdog mode/ Q/ c3 S# x5 Y( t& f9 w6 R
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
/ N& {3 L: U4 J( X# iTimer.timerSettings[1].master = true;. N& ?$ {4 E. H: q1 |: v1 w& q2 A
' D- f5 V* r0 [+ w0 Z9 o% r//Instance config parameters for Timer3 Y4 {$ z O+ f Z, l; r
var timerParams = new Timer.Params(); //Create a new Timer params struct
" `! ]) ]' K" H$ k7 t1 utimerParams.period = 1000; // set to your period value here
5 t" L2 f. ?1 ~1 G' t5 e& FtimerParams.periodType = Timer.PeriodType_MICROSECS;
- }, m* c$ r1 OtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode6 w9 t. r* W8 d% ?1 p* U0 `
3 q+ H9 m8 o4 I6 r% ZProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
/ U7 H! }% f0 ` G% o/ A5 E; K& l
: K' @* f& v' z+ \
. `1 G$ {0 r U1 g, X9 R这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 : j Z, \5 C$ j0 e
竟然只支持chain和unchain的。。 请大神指点怎么配置????
; M/ a" l; ~, q& A4 {' N |
|