|
|
请问谁静态配置过omapl138的看门狗?# ~* w2 U/ }6 ]1 ?6 d+ X
//*************** Add watchdog **********************//
8 k( ~, F7 d& B7 L: kvar Clock = xdc.useModule("ti.sysbios.knl.Clock");
9 `! a1 k5 l6 L2 uvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
4 _9 `6 G" l7 c; `* K. R' N9 F# z( b3 [* g6 L
//Puts timer1 in watchdog mode( }8 Z0 T, x! Q, [- J
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;( t! p5 t: G% J# ?
Timer.timerSettings[1].master = true;- [+ s1 r5 s& X; C+ w+ J# Y
1 r9 u' a: D9 d
//Instance config parameters for Timer! k& a; e: F: K( T/ q) y' f( O
var timerParams = new Timer.Params(); //Create a new Timer params struct/ d7 y# G0 O5 `
timerParams.period = 1000; // set to your period value here
( P0 p: r: X5 z1 PtimerParams.periodType = Timer.PeriodType_MICROSECS;7 }! K- }& z1 f6 W6 J- Y8 l
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
$ |- L! D' v/ s3 f9 ^
3 W/ q" K& T1 i6 XProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);8 D- U4 o5 R3 w6 A
# ]: B: ^& l& |$ V8 i! _* z5 u
: p6 a" v4 z* b- x# T这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
! ]/ f7 B9 m- H/ t7 d( R2 P# e竟然只支持chain和unchain的。。 请大神指点怎么配置????! o6 K- H z1 Z) m% S' y1 \7 c
|
|