|
请问谁静态配置过omapl138的看门狗?
4 c0 Z6 \% W. n0 X//*************** Add watchdog **********************//) K, W; V5 b/ x* Q' L) T
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
7 N3 U& k; L2 X+ I1 r' Qvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");/ J) A5 q& b% i) \" w- R; Y
1 {- M; S* u. _& N* q0 Y3 w
//Puts timer1 in watchdog mode5 m, Q$ K2 f% g! M
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
* F' F' s2 [6 Q$ T) E0 |Timer.timerSettings[1].master = true;& Q; m Q& K* R: \
8 T9 a# D* @# j; H/ N5 U% {$ f
//Instance config parameters for Timer
4 y7 {- C0 n- k4 {var timerParams = new Timer.Params(); //Create a new Timer params struct1 X2 U& Y1 c$ }2 i8 B# B
timerParams.period = 1000; // set to your period value here0 `* D' B6 T2 G
timerParams.periodType = Timer.PeriodType_MICROSECS;
; i g( I6 a! h9 b' S" JtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
6 t+ y3 I+ e, H
3 e9 K, T7 y1 G& h9 C$ YProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);3 _: Q5 `! W0 u& A" Q
, g$ `0 f* b, F3 `0 z! r% J% q1 k, \ A/ c
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 # z) ~2 M' R$ |; _! f( ]2 R
竟然只支持chain和unchain的。。 请大神指点怎么配置????
/ t- b+ i z/ [0 f |
|