|
|
请问谁静态配置过omapl138的看门狗?
( K- ?! Y$ t5 R! s5 ^: ^) f7 {//*************** Add watchdog **********************//& d. ^: @, T1 S2 ^8 u$ @6 Y; w
var Clock = xdc.useModule("ti.sysbios.knl.Clock");+ c _* Q3 Q9 s
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
+ b. R- E+ j2 j3 D: J7 U' u) `) U I: J" V$ @5 C Z
//Puts timer1 in watchdog mode
4 J& w/ \6 s) y8 ]$ m! | DTimer.timerSettings[1].mode = Timer.Mode_WATCHDOG;
' D# C) J( K" ?( l1 NTimer.timerSettings[1].master = true;6 W8 a6 l; P' k! M" P
. R- Z& j1 G+ R9 |//Instance config parameters for Timer
( ]* E( E6 G* Q/ X4 Jvar timerParams = new Timer.Params(); //Create a new Timer params struct& c7 G+ Q; F; G2 z) A1 d
timerParams.period = 1000; // set to your period value here
I5 a' R2 M% ]timerParams.periodType = Timer.PeriodType_MICROSECS;7 |) z# g" V- p; }: v
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode4 j6 F- \3 S8 t w
8 o. Z! W! Z& P5 C) D# k
Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);% J! M8 W G( B2 T
" S" V! A8 S4 B/ s3 z9 i
! D, Z, a( o7 c) P! }1 s这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1 " P2 [0 _* C! V7 G
竟然只支持chain和unchain的。。 请大神指点怎么配置????1 V1 D- ?" I5 z, E+ g
|
|