|
请问谁静态配置过omapl138的看门狗?: m, W3 J( b* x% s
//*************** Add watchdog **********************//
4 M0 O1 z: G1 c) t! q0 |var Clock = xdc.useModule("ti.sysbios.knl.Clock");- u0 `/ ?; s' `- K8 D& i
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");. J& E; h: O9 W7 d) p
, Z' t u$ O3 c//Puts timer1 in watchdog mode4 U" B7 T }2 v7 F1 k# c* v' h* ]
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;% d2 d- f& f: I6 f) L
Timer.timerSettings[1].master = true;* O e0 M' h( H
/ z0 @# K% L7 ~! ^. z//Instance config parameters for Timer
4 g' [+ c2 o, s/ `& Bvar timerParams = new Timer.Params(); //Create a new Timer params struct P! w' B5 M# x3 D; t
timerParams.period = 1000; // set to your period value here
1 O4 U. o- p2 h8 k" ktimerParams.periodType = Timer.PeriodType_MICROSECS;
, d: s. S; U* t: I8 f; QtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
9 `3 L) E! Z( p% P9 r- T
: ]; I; J" p5 A. @9 j' RProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
8 [7 n% k9 e8 D3 ?, h U: l0 `4 u" f( z# m/ D6 V* K
% m7 m- p: x+ p! o这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
/ d) w2 [& Q- e! u9 i竟然只支持chain和unchain的。。 请大神指点怎么配置????
, F+ f9 g" n4 T- A |
|