|
请问谁静态配置过omapl138的看门狗?7 A% S1 x( } S1 I
//*************** Add watchdog **********************//
% c. U7 ~$ X$ g' Tvar Clock = xdc.useModule("ti.sysbios.knl.Clock");: q. d h* Y. v) F# m0 d$ G
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");9 D4 j8 C' z9 u2 Q3 [5 j4 T
4 c3 Y: G# }. T/ i6 l
//Puts timer1 in watchdog mode* l j3 ^: I! Q. h) m
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
8 {# h6 I* K* p* Z7 m8 t& pTimer.timerSettings[1].master = true;
9 ^- c. E. L) i# Q( L! i* {7 y
, t: t7 j' x( |1 }8 W2 b//Instance config parameters for Timer9 e' B w3 ~, i' L% m
var timerParams = new Timer.Params(); //Create a new Timer params struct$ b: K+ C2 h, @1 @0 ?* q& G( T/ P
timerParams.period = 1000; // set to your period value here
! L f6 D9 v( htimerParams.periodType = Timer.PeriodType_MICROSECS; R, b" Q# J) Q" P, d" ^* _
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode Y: c' _, ?; L! z4 i
! c5 h/ b0 n4 u% V* D( W+ U
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
: S y, K( L6 l+ n
# f! B. T r( ~6 |6 I/ n+ L2 T6 Y, I; g
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 ; y; y3 C2 q- p6 v- i6 I& ]0 u% a( E
竟然只支持chain和unchain的。。 请大神指点怎么配置????
9 a% }% I/ W4 d1 ^( F/ Z" T |
|