|
请问谁静态配置过omapl138的看门狗?; K ^7 u- |4 I: d: c
//*************** Add watchdog **********************//
, Q1 s4 P9 }3 N m2 m; Bvar Clock = xdc.useModule("ti.sysbios.knl.Clock");$ v3 | H- k# x, a' c/ _9 O
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");9 [5 N, l3 U4 \! n3 S" |, C
" ~, k' t D% g B//Puts timer1 in watchdog mode
# t9 t! h( M0 Y9 C3 g2 [+ |Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
; U2 W5 A: l8 T, v0 nTimer.timerSettings[1].master = true;, u8 k' j' r, v! p/ M
$ B* V' ^% e" P0 [//Instance config parameters for Timer+ s1 Y! x0 F- Y4 [
var timerParams = new Timer.Params(); //Create a new Timer params struct9 h8 u' V( n9 x3 H) ~- h
timerParams.period = 1000; // set to your period value here
2 p `5 N7 ~! D! y# ~2 O9 WtimerParams.periodType = Timer.PeriodType_MICROSECS;
) f# |' g" N' u2 mtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode$ y+ M0 Q" [) H
! G/ l. C# m3 V5 Q2 e
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
- L" z3 W0 D& F# r0 D, b
+ ^7 S. E# H9 q; R7 C& j
5 ` w4 z" e2 s: V3 L% ^3 \, P这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
; o( H! q* W3 r6 n Y2 M* l竟然只支持chain和unchain的。。 请大神指点怎么配置???? P$ ^; W% r. H
|
|