|
请问谁静态配置过omapl138的看门狗?
7 W' X6 {; i Y( J, D//*************** Add watchdog **********************//
2 t6 C! k' {' K' l2 n" p4 Uvar Clock = xdc.useModule("ti.sysbios.knl.Clock");
+ d/ {% ~7 `5 Gvar Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
: g1 _& D+ U% C- W! j' Z
2 s2 b" x6 U" _. P& A! M% X! C//Puts timer1 in watchdog mode [( Y" v1 C+ X' p1 W
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
4 z$ P6 g6 [6 }2 N/ f% B" q- ^+ r1 ITimer.timerSettings[1].master = true;
6 b" I$ R6 P) J! c3 F4 @
5 Z# y* J9 C, R5 d$ _8 O2 V) r//Instance config parameters for Timer
, O; k! ~7 y2 Q8 F; X8 ]) Tvar timerParams = new Timer.Params(); //Create a new Timer params struct
! J" W! A, Y$ W0 V8 otimerParams.period = 1000; // set to your period value here( Q" l3 t- J7 G+ m w! D
timerParams.periodType = Timer.PeriodType_MICROSECS;
$ q% B* f( Q, }% K9 @timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
* B+ Q# G3 n7 I# {) A
( f$ i g( Q( Y5 B+ }2 w6 VProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
$ `& p( Z A4 l- T
$ Y% j: B0 {6 S( W' r8 b A9 ~' x% t+ @) }+ e) C4 {
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 0 `; m% I0 U$ L- F6 ?5 O6 z+ h+ F& o
竟然只支持chain和unchain的。。 请大神指点怎么配置????
' O( a, W3 m8 w, k |
|