|
请问谁静态配置过omapl138的看门狗?+ H! ]" Q7 @( b( f; a
//*************** Add watchdog **********************//% Z- N$ b" _/ R: `
var Clock = xdc.useModule("ti.sysbios.knl.Clock");' p7 `2 {. p+ H; R
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");2 H% b9 l4 h2 ~; d' |6 k
$ S. N. K( D' ^, d5 J//Puts timer1 in watchdog mode+ X0 I4 l" r S3 M
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;# ~7 ^* U; G1 H" m) M: _# s) h" P
Timer.timerSettings[1].master = true;0 u2 S, A4 M1 C7 P
6 ]3 v' m' L1 Q8 l: w//Instance config parameters for Timer
) k6 o+ O' V# w4 L! ~. _3 S% e8 a- qvar timerParams = new Timer.Params(); //Create a new Timer params struct
8 J* C1 _, U/ C$ b& v& Z/ k/ ]. ^timerParams.period = 1000; // set to your period value here
& l: `. u m* m( ntimerParams.periodType = Timer.PeriodType_MICROSECS;1 P5 ~1 k3 S# f
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
1 g/ }& _# C8 D$ n& I4 `* a/ F# \- b; n/ S: K. V8 Z
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);* ]: p' D, J* K$ S7 M
. `& _ t5 @% ~/ t' j
+ A# x% v# M6 F* t( _+ B
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 8 X: U9 R4 N3 o- [/ H
竟然只支持chain和unchain的。。 请大神指点怎么配置????
8 k5 M2 [8 H/ r {! P |
|