|
请问谁静态配置过omapl138的看门狗?3 l+ t" g4 ]+ H' v- m- E# K% N
//*************** Add watchdog **********************//
0 f7 D D1 I# F: a* U7 jvar Clock = xdc.useModule("ti.sysbios.knl.Clock");6 l# _- V8 b( O" B$ i- |8 D
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");- x' e0 o' E6 @$ e! i6 q
3 w6 z, H. _5 u
//Puts timer1 in watchdog mode' @* x6 O D9 y' G6 U$ u
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
) |$ _$ F2 l5 p2 ?: @Timer.timerSettings[1].master = true;
: L4 W# a; v$ O7 G. a1 ~4 n/ I7 w" T& Z9 { o E, H
//Instance config parameters for Timer8 T! a) H- l) g* n8 L; A
var timerParams = new Timer.Params(); //Create a new Timer params struct3 K$ v4 S1 c0 E7 g
timerParams.period = 1000; // set to your period value here9 s* A, I! n4 f/ t& D5 F
timerParams.periodType = Timer.PeriodType_MICROSECS;
0 i" f: f. q* |timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
9 f. B+ f, C' ^; a! S* f$ W
0 N( i6 R3 a0 C8 W4 aProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);5 e& J% @" I) k) l4 R
' n c6 g( k( T, Z6 v2 O3 r
8 M! z0 H2 X2 h3 U# G* S
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 - h( R3 W) c9 v- r3 K# L
竟然只支持chain和unchain的。。 请大神指点怎么配置????
% p; L" |7 |; ? |
|