WDOG TOVALH and TOVALL

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

WDOG TOVALH and TOVALL

1,282件の閲覧回数
mrandreas
Contributor III

In term of setting the minimum time for the watch dog to be updated. Has someone made the conversion from microsecond to setting the tovalh and tovall when using the ALT CLK \ bus clk or LPO?

Thanks

Andreas

ラベル(1)
タグ(1)
1 返信

1,065件の閲覧回数
Robinwithu
Senior Contributor I

Hi Andreas,

Here i did for MC9S08RN16 micro controller

/* Initialize watchdog with ~1-kHz clock source, ~1s time-out */

DisableInterrupts; // disable global interrupt

WDOG_CNT = 0xC520; // write the 1st unlock word

WDOG_CNT = 0xD928; // write the 2nd unlock word

WDOG_TOVAL = 1000; // setting timeout value

WDOG_CS2 = WDOG_CS2_CLK_MASK; // setting 1-kHz clock source

WDOG_CS1 = WDOG_CS1_EN_MASK; // enable counter running

EnableInterrupts; // enable global interrupt

Thanks and Regards,

Robin