|
|
请问谁静态配置过omapl138的看门狗?" N& ~4 S2 ~: b1 t6 B0 p
//*************** Add watchdog **********************//5 x3 o- _. z; A4 T4 }( Y* t1 O
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
+ w+ M/ x3 v9 D+ Hvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");' d' o6 t& S2 o3 k
( }) p% K2 A- V" B# T7 J% i
//Puts timer1 in watchdog mode
2 G) w7 k7 g3 {9 FTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;* e( H) K2 `/ k; q5 }
Timer.timerSettings[1].master = true;; ~* V! z; V! W9 Q4 X7 ~+ [
$ Y. ?; x" A" H+ l
//Instance config parameters for Timer5 C* T) I5 n5 O& l* A# `6 Z
var timerParams = new Timer.Params(); //Create a new Timer params struct
- g( L, w$ D# z2 C( P, o" CtimerParams.period = 1000; // set to your period value here
- a- N5 v1 K, P( c- l. utimerParams.periodType = Timer.PeriodType_MICROSECS;
; I" \; g7 S- j: |6 JtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
+ P) \3 C2 \! ?- w4 |' l* m+ D* u% a; e1 ^# ^, m
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);; \: ?% T8 s& ]5 Y& R* e5 j. J
7 x% B5 w$ ^; N+ Q
# V/ H8 d5 |- N
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
) n, |% A+ B1 L) G竟然只支持chain和unchain的。。 请大神指点怎么配置????
0 |5 o; A: d4 e; G0 p# c, G) u |
|