|
|
请问谁静态配置过omapl138的看门狗?
8 O- K a& i: L; K# I" D//*************** Add watchdog **********************//# L$ {" U9 C+ V) H9 z4 K) o+ g+ a
var Clock = xdc.useModule("ti.sysbios.knl.Clock");- U* j `$ U, H6 a( m
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");1 u# Z+ |3 T u+ Z
& d4 M7 M; B$ u3 N//Puts timer1 in watchdog mode F P& A8 \) q5 i2 {
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG;3 f0 A' T" q4 z7 Q3 H
Timer.timerSettings[1].master = true;
: ^6 ^1 G' }4 ~- [6 }4 n# d/ h- B4 M. U
//Instance config parameters for Timer2 E/ J" r: _. Q9 ^; M
var timerParams = new Timer.Params(); //Create a new Timer params struct
" q J, d$ Z- a- l) M+ @timerParams.period = 1000; // set to your period value here5 f. I j" k- E4 K6 r+ n# u4 l
timerParams.periodType = Timer.PeriodType_MICROSECS;
* g( Z" m% J: H$ r5 q6 ~' ]timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode. ?$ M: a1 B. h5 {2 Q- V) p2 ` N( z
! }7 a: q7 Z- U1 xProgram.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
' f+ F9 D) g3 V' _9 R
. Y: y6 a3 W! k
7 p) q; ^1 w' @" N3 \2 J这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
6 ^5 [8 [7 n3 C G3 V% u1 }- k竟然只支持chain和unchain的。。 请大神指点怎么配置????
2 M% Y: I/ T/ ^ |
|