|
请问谁静态配置过omapl138的看门狗?" L9 \" g* [3 A7 M. A1 _
//*************** Add watchdog **********************//8 Z7 G' @! g: e- ~ r; |# E+ }+ l
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
( H$ d- B2 \/ z" \9 H6 Ovar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");/ B, S' ]/ l3 x# b! H2 a+ u
! ^+ ^- c1 i( R2 m$ k2 [- q//Puts timer1 in watchdog mode
! e0 w5 P0 F( V( s9 H3 n( @0 C4 ^Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
0 b5 S+ p, X; S: t* p; @Timer.timerSettings[1].master = true;
0 Q; T. a5 k* W( [! T
! {( v6 g* [% S9 w//Instance config parameters for Timer" o, ~6 v7 u4 x& C! H3 h
var timerParams = new Timer.Params(); //Create a new Timer params struct w S O% V4 D. X& ?, I% U, o
timerParams.period = 1000; // set to your period value here
* ]9 V: q, h* c D2 H( MtimerParams.periodType = Timer.PeriodType_MICROSECS;( b2 m1 Z/ x( B8 m6 Q
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode3 l( x& a" S9 q
4 P3 S% ^8 l, m0 _
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
5 K5 |) d& L+ Z, b
/ l# w6 l( ^3 P6 ~$ O0 w$ `# }$ y: G
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
: f( V9 q% x8 y竟然只支持chain和unchain的。。 请大神指点怎么配置????
* F6 r2 `& D, Y5 e9 e: b |
|