|
请问谁静态配置过omapl138的看门狗? e5 n1 H t$ p% V
//*************** Add watchdog **********************//
0 I7 o/ @( f/ Jvar Clock = xdc.useModule("ti.sysbios.knl.Clock");1 i3 K. x0 [& f0 Y2 X Y
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");, J/ H1 P$ {9 p( ` h) x7 {
' l' W9 ~$ N- R/ n7 ^
//Puts timer1 in watchdog mode
* i! r+ ?. f/ c& u1 x# S# Y6 o' a4 vTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;+ r+ x Y# l& O, d1 q
Timer.timerSettings[1].master = true;
3 _; e" a) d9 V: z. J) k9 t b" I9 k: m2 L$ i
//Instance config parameters for Timer
* B) h5 g8 W+ o) Mvar timerParams = new Timer.Params(); //Create a new Timer params struct# q% c: w+ l' i6 ?$ W& ~
timerParams.period = 1000; // set to your period value here. {4 _5 Y4 o8 u% F
timerParams.periodType = Timer.PeriodType_MICROSECS;
% P3 d4 B' N9 u+ UtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
/ O- C- @( A' {0 n) \5 ^: g6 G1 P7 T( A/ t
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
Q Z( C, p# D3 M; E8 O$ j: z# I" G: j& W8 L. [
" O2 N' H3 y2 ^, x, P7 x
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 7 @3 k" N: L! ^ E: b; e; m
竟然只支持chain和unchain的。。 请大神指点怎么配置????3 T$ |$ M& ] Y- j
|
|