|
请问谁静态配置过omapl138的看门狗?
* v$ T+ @8 a* M//*************** Add watchdog **********************//
( z7 f2 @# G7 Y6 C4 g- S. R, dvar Clock = xdc.useModule("ti.sysbios.knl.Clock");
% w' A* ~/ k( a( d+ Avar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
, Z1 Y! X3 U. B* ~ Z0 l) R
9 _+ M1 D. ?& h4 w//Puts timer1 in watchdog mode
# l) L4 o# n5 V1 eTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
8 W$ B) F- u) l+ a' TTimer.timerSettings[1].master = true;9 _2 s. H7 E# l( `3 B
0 f6 o6 P! `4 f" Y4 L7 m
//Instance config parameters for Timer
# Z% ~- N3 H/ s/ x0 Svar timerParams = new Timer.Params(); //Create a new Timer params struct
8 U/ N5 J7 z9 `- S. Y$ J9 rtimerParams.period = 1000; // set to your period value here6 p- K* k- r. @+ r: B/ Z4 v p
timerParams.periodType = Timer.PeriodType_MICROSECS;
4 _1 b# w( a# xtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode5 k# o3 d' S7 N) v2 t. V
- A; c$ y' S$ W7 a3 F# Y ^Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);6 A: i2 c y( j3 o: j
" |$ I. X+ s O. m4 I# g+ H
7 ]6 G7 Q" P/ `0 w( e% ?4 G# k这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
3 X: q1 U! ?0 z$ s% i) b竟然只支持chain和unchain的。。 请大神指点怎么配置????- U& J' R* j9 x3 U$ ]5 Q
|
|