|
请问谁静态配置过omapl138的看门狗?7 k5 Z* U4 F# n5 r
//*************** Add watchdog **********************//$ ~; D) \$ y9 i% w, G5 O8 [
var Clock = xdc.useModule("ti.sysbios.knl.Clock");9 \$ s, Z% U8 Q) J* W# m1 N
var Timer = xdc.useModule("ti.sysbios.timers.timer64.Timer");
3 l) B2 \ Q$ q) ]; d; M' t( ]# Y" k% @5 K7 ] z: ^& }' o4 O
//Puts timer1 in watchdog mode% l/ z* J% z! R- n, [2 Z" |
Timer.timerSettings[1].mode = Timer.Mode_WATCHDOG; U' E5 d, t/ `. F( n/ l `
Timer.timerSettings[1].master = true;
* ^" ~1 P7 u. t* d% k1 v5 {2 |; R
6 H* D: g$ h6 M- s9 r; u//Instance config parameters for Timer/ I" r: v% F' O7 {8 z. l
var timerParams = new Timer.Params(); //Create a new Timer params struct
2 z# c$ Y8 @: C' d2 ptimerParams.period = 1000; // set to your period value here
* Q, U2 B* _! q1 e: KtimerParams.periodType = Timer.PeriodType_MICROSECS;+ M% P O4 P0 Q9 a+ r: l
timerParams.runMode = Timer.RunMode_ONESHOT; // specify if one shot or continuous mode
% m) I8 g! p! A% N
7 O! l# G+ b" B. ^Program.global.Mywatchdog = Timer.create(1, "&WatchdogOvertime", timerParams);
7 e$ n5 _, d0 Y u9 A1 ]
& n* u3 g& E0 U2 I" t( H: u2 n) r. L
这样配置后,编译出错,Unsupported mode: 2 is specified for Timer: 1
2 Z( w# k5 |! {& m/ y/ y竟然只支持chain和unchain的。。 请大神指点怎么配置????; [: J9 z& ]8 J9 b5 K" U( q
|
|