|
请问谁静态配置过omapl138的看门狗?
9 Q5 s" K0 O+ q0 V# h6 q& b$ g6 y" ~: q//*************** Add watchdog **********************//
2 J" { t+ [2 f0 d# X$ ^. s1 mvar Clock = xdc.useModule("ti.sysbios.knl.Clock");
- S0 H+ p) A! Yvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
) W3 _ U0 \8 @) w/ Z4 s4 ^
8 Y P7 h; ], j5 y* w) ^//Puts timer1 in watchdog mode
% @" k7 b, Y3 D1 Y9 DTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;8 g H9 H& F" ?' f" u
Timer.timerSettings[1].master = true;
1 Y9 O$ W/ q' @; j% C% i- {$ K% e [ H b1 e2 M
//Instance config parameters for Timer
7 y# [9 ]5 C; Gvar timerParams = new Timer.Params(); //Create a new Timer params struct4 z& ~4 c, `3 ?- O
timerParams.period = 1000; // set to your period value here
# U2 A1 b* S9 WtimerParams.periodType = Timer.PeriodType_MICROSECS;
7 p- O. V5 \. `2 [6 E0 o' etimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode; n0 ~+ p4 Q; b0 Z1 j
/ e1 i7 a% _) k% S; ]
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);2 x( n( ^9 W$ |% x" O
0 S6 S( z4 n9 ^; y7 I# S$ @
+ S# A6 k- j- E: }这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
4 T. d2 j* Z# G& }5 M竟然只支持chain和unchain的。。 请大神指点怎么配置????
% V ^) z0 Z& s/ Y/ a# M' d S |
|