MCF52233 - How to turn on Watchfdog timer - using Nichelite stack

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

MCF52233 - How to turn on Watchfdog timer - using Nichelite stack

556件の閲覧回数
TVNAIDU
Contributor III

Need badly how to turn ON watchdog timer in 52233 demo board. Currently I get board hangup - I need to reset board automatcically , appreciated.

ラベル(1)
0 件の賞賛
返信
1 返信

388件の閲覧回数
TomE
Specialist II

This chip has a very simple watchdog. The Reference Manual makes it clear how to use it.

 

Just write a byte to CWCR to enable the watchdog to reset the CPU after an appropriate timeout (between 2^9 and 2^31 bus clocks), and then regularly write the required values to CWSR from some appropriate execution path in your code.

 

When the Watchdog triggers you'll lose all ability to find out what went wrong. I usually set up a hardware watchdog and also a software one (spare timer casuing an NMI) set to trip before the hardware one does that prints where it interrupted the mainline and that the hardware watchdog is about to trigger.

 

The fact that the last reset was caused by the watchdog is available in the RSR. You should check this on startup and do something sensible (like count it in EEPROM) if the last reset was caused by the watchdog.

 

Tom

 

0 件の賞賛
返信