|
|
请问谁静态配置过omapl138的看门狗?
% Y G/ ^3 k0 [+ X* N//*************** Add watchdog **********************/// d) D$ O" |# _' `
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
! E, F; T' D( }- |) Ivar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
; g$ o, q$ {& P: d" V h! U6 [( P" @2 U1 A
//Puts timer1 in watchdog mode
0 k, c% a2 ^% _# g7 {( \7 P+ Z$ xTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
+ `( B3 B, k( H7 xTimer.timerSettings[1].master = true;
7 q, T$ q( K1 f A: h2 N* M; \7 ?6 z
//Instance config parameters for Timer) D. S8 A; D" X- o
var timerParams = new Timer.Params(); //Create a new Timer params struct. P& b: d. | p; ~4 ~
timerParams.period = 1000; // set to your period value here9 z9 u# p; A1 X: ~( k& J
timerParams.periodType = Timer.PeriodType_MICROSECS;
6 n7 v6 G4 ^% ?4 T) ]# ttimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
; z. X+ W7 n- M' i5 A" Y1 n. e7 h7 [4 Q9 y# u
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
# B4 s0 {5 i9 V( k
3 L+ L1 ]5 H$ D5 O u
) P( ?6 J8 v% h这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
) J# F" @; ?& D竟然只支持chain和unchain的。。 请大神指点怎么配置????& e: x3 o2 W; d! w7 H
|
|