|
请问谁静态配置过omapl138的看门狗?4 D ?9 P( L; }
//*************** Add watchdog **********************//( ^! ^* h/ O) P
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
6 P( L0 M! N$ I: {# p. vvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
& Q7 F. @+ p4 G; J$ A3 M$ X- p4 E+ h- v; G) j
//Puts timer1 in watchdog mode
, p# q. |$ d8 w# L7 lTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
* p/ ^7 B9 @& k- r! STimer.timerSettings[1].master = true;
; N1 Q1 L8 M) d0 z3 v: ^' `& v4 x
//Instance config parameters for Timer
4 s# C2 H( Y" |. H. {. o+ E: Qvar timerParams = new Timer.Params(); //Create a new Timer params struct
+ v3 o* [* S; N7 {+ DtimerParams.period = 1000; // set to your period value here% X& t9 t. E9 n y& g
timerParams.periodType = Timer.PeriodType_MICROSECS;
5 i; P7 C2 N1 b; f1 htimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode9 b- H( z( d J8 J3 F9 F
- x y l: h0 d0 q; b' D
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
# }! B. P* C+ f
. S2 t8 L. W3 X2 G& o8 T9 J8 V" u9 L/ n( V
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 $ a& O7 D) ?0 J
竟然只支持chain和unchain的。。 请大神指点怎么配置????- s2 n0 {! U7 n8 z# r
|
|