|
请问谁静态配置过omapl138的看门狗?6 [% d0 j% J0 l
//*************** Add watchdog **********************//' b) V! q% [9 t
var Clock = xdc.useModule("ti.sysbios.knl.Clock");+ g' t8 M3 k; s- s8 y/ n' k
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");8 ?0 J2 Q5 E- P1 G# x3 G$ N
! s2 U( b2 ]; W/ j
//Puts timer1 in watchdog mode
0 R7 p/ m8 O3 yTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
4 ~- `) _- A F# s& ~8 {Timer.timerSettings[1].master = true;
' h' L3 X) `# v9 \
' t8 E/ e) S/ e! i7 Z//Instance config parameters for Timer
: W! `, u4 X* I7 d" K1 K0 Avar timerParams = new Timer.Params(); //Create a new Timer params struct
D% U: m$ H9 v# rtimerParams.period = 1000; // set to your period value here
8 n; e5 i, U, B9 u. g8 N3 [timerParams.periodType = Timer.PeriodType_MICROSECS;; P& z# q9 @# E2 r
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
; W! Y5 n3 s$ w3 `# T- M/ J
! Z; |# U2 Y# M+ C* oProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);2 i6 _1 @0 t& R7 ~# h# O
% n0 m; g, m4 z1 H) l
3 M$ O3 p# S) v' s$ `这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 $ f$ L& Z0 X! Y4 d8 I
竟然只支持chain和unchain的。。 请大神指点怎么配置????5 j( T/ ^- I5 x( ?& y/ s
|
|