|
|
请问谁静态配置过omapl138的看门狗?- ^) K8 E L6 N5 [3 T
//*************** Add watchdog **********************//
: j; t- `0 X2 E4 @, V6 Nvar Clock = xdc.useModule("ti.sysbios.knl.Clock");8 l. r$ p( k3 m. G# a6 O2 I
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");8 }7 a" \ A2 r/ l4 j+ C4 o7 N
' I( x. y) H, I//Puts timer1 in watchdog mode
: m7 @* f4 r. i! S, T% cTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
; G0 Q! x3 L7 RTimer.timerSettings[1].master = true;
& L" ^4 m* ]4 s! V
4 c# @$ L5 }0 b8 w//Instance config parameters for Timer, b8 W9 t6 m* N1 q3 j7 c8 ^8 @
var timerParams = new Timer.Params(); //Create a new Timer params struct
0 j, x f2 G2 `+ B2 d1 jtimerParams.period = 1000; // set to your period value here
( h. S- _5 }& v3 |, YtimerParams.periodType = Timer.PeriodType_MICROSECS;5 s7 J4 \& H6 N( h4 Y
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
0 R7 W9 E6 l- ^* Z1 [ C* U- b5 L2 c6 ?3 d6 X$ h" e6 g$ I
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
* J0 Z$ N/ |2 t" j; b) ^& D
" i- T, Z. L& N
* j5 @; P! e0 g# U3 B" W这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
% T( Q9 \- @' s/ r5 r, o& @' m( y竟然只支持chain和unchain的。。 请大神指点怎么配置????; b1 y# u2 [' a+ b! B& a/ s
|
|