|
请问谁静态配置过omapl138的看门狗?
; x% q& b4 i2 h+ ~# t//*************** Add watchdog **********************//6 R2 u8 U" J+ g
var Clock = xdc.useModule("ti.sysbios.knl.Clock");6 `6 f: A/ y& F0 X/ Y; n. t" z
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");7 r' u1 d$ E& \$ [/ m. i
: o1 {: C, F8 Q: E. B& U4 B
//Puts timer1 in watchdog mode- a, O! s. |! i
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
$ u5 y7 O2 e, [; Z6 {' n; GTimer.timerSettings[1].master = true;% D5 k/ }' m7 T; w
" [4 F% ~6 l1 e! f5 k% o
//Instance config parameters for Timer+ ?) k5 h H" w
var timerParams = new Timer.Params(); //Create a new Timer params struct
) [" [! m8 C( F, u' n$ `, ztimerParams.period = 1000; // set to your period value here
, Y! X J# h! I7 P; t YtimerParams.periodType = Timer.PeriodType_MICROSECS;1 `. U+ ^6 v" N P- P/ `
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
7 y+ z7 X, H7 E, j( V4 j( ~
& ]/ | h" Q& b% }: F1 D0 h6 jProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);1 I; a& L( Y$ r$ Y) W
6 h/ M2 W9 c) e8 t+ g) W
6 e) ^: @. N5 K$ S) K这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
& y1 P6 p) q7 f0 }8 ?竟然只支持chain和unchain的。。 请大神指点怎么配置????6 Y$ B0 F1 Q$ R% ^
|
|