|
请问谁静态配置过omapl138的看门狗?
. o E! f' P1 r' J+ I' a//*************** Add watchdog **********************//0 l* L- v7 m- g/ T
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
2 v N/ ~. _4 ^5 _0 Ovar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
+ g& K3 ^+ u% a7 M: g# C
1 F" t! u9 m5 n. D" F" q2 ?//Puts timer1 in watchdog mode
6 C( {" V9 B1 y5 b7 @Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
5 T7 H y3 \5 Q' K/ E8 pTimer.timerSettings[1].master = true;
' T6 G \# P, l% k. G
7 y+ V9 y( ]5 W: E \' O0 [4 `//Instance config parameters for Timer
/ i2 w! k- T; R9 h' avar timerParams = new Timer.Params(); //Create a new Timer params struct5 j' y* W( t# Q, Q: x) X* F# u. X! ^8 `
timerParams.period = 1000; // set to your period value here
6 }& Z, i2 g% V2 Z5 s2 {. JtimerParams.periodType = Timer.PeriodType_MICROSECS;
7 u7 g3 E# t- | h, WtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode! N/ {: o+ N, l# k! a6 W& [" j( s
% N( X/ K: x- W
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);6 h6 A# d+ f/ m1 D, P- g( C
+ _8 v G, W+ X3 g& H9 f9 g+ ~% f; M1 x2 j
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
3 E. o0 Z0 e1 l' {+ ^; F! Y2 \) i5 b. ~6 w竟然只支持chain和unchain的。。 请大神指点怎么配置????
! \' p& g, C- D7 l, [! D |
|