|
请问谁静态配置过omapl138的看门狗?4 ~0 u& l# a& B1 r
//*************** Add watchdog **********************// \, s" U. l) Z' `5 B: L* {4 T: v
var Clock = xdc.useModule("ti.sysbios.knl.Clock");6 |- E3 f, w% S- e2 S& p R
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");, w/ S4 ?( D, x7 q2 Q, V6 o& T
/ n- z1 }- J, j4 u3 i0 `; P2 i6 ] T//Puts timer1 in watchdog mode# p( Y3 K6 B4 l B2 s) h. J* M
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
! t$ [* ]- w: OTimer.timerSettings[1].master = true;
- `4 c9 `: w8 G' Y' b* f; t; l: A: T# j4 v/ S/ |
//Instance config parameters for Timer# s( y5 Q" ^7 Y& I
var timerParams = new Timer.Params(); //Create a new Timer params struct, D3 Y% @* N* N( ?; e4 ^) Q! s
timerParams.period = 1000; // set to your period value here
5 u6 A- P F" {0 }timerParams.periodType = Timer.PeriodType_MICROSECS;
: M9 |+ h' i8 S8 k, w' e9 QtimerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
5 ]$ n; ^! H$ b0 I( Y
! k1 S& b; N+ ?) S. P4 | cProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
8 r1 }) t* H) L6 G% M
9 y& }5 G' W. G( \% O: `$ Z% C& ]5 D* n- {
9 \$ f6 ?* [5 P2 E& K这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 6 B! j3 P9 d8 K/ f7 W% S+ f
竟然只支持chain和unchain的。。 请大神指点怎么配置????3 V6 @1 o5 C8 W
|
|