beautypg.com

Appendix a. watchdog timer – Acrosser AR-B1851 User Manual

Page 35

background image

AR-B1851 User’s Guide

AR-B1851

35

Appendix A. Watchdog Timer

The WDT(Watch Dog Timer)is used to generate a variety of

output signals after a user programmable cont. The WDT is

suitable for use in the prevention of system lock-up, such as

when software becomes trapped in a deadlock. Under these

sort of circumstances, the timer will count to zero and the

selected outputs will be driven. Under normal circumstance,

the user will restart the WDT at regular intervals before the

timer counts to zero.

WATCHDOG TIMER SETTING

The watchdog timer is a circuit that maybe be used from your

program software to detect crash or hang up. The watchdog

timer is automatically disabled after reset. Once you enabled

the watchdog timer, your program should trigger the watchdog

timer every time before it times out. After you trigger the

watchdogtimer, the timer will be set to zero and start to count

again. If your program fails to trigger the watchdog timer

before times out, it will generate a reset pulse to reset the

system or trigger the IRQ9 signal in order to tell your system

that the watchdog time is out.

User could test watch dog function under ’Debug.exe’ program

as follows:
WDT Example Description
o 2e 87

;Extended Functions Enable Register

o 2e 87

;Extended Functions Enable Register

o 2e 07

;EFIR=EFER(Extended Function Index

Register)point to Logical Device Number Reg.

o 2f 08

;EFDR=EFIR+1, select logical device 8

o 2e 30

;select CR30

o 2f 01

;update CR30 with value 01H

o 2e f6

;select CRF6

o 2f 08

;update CRF6 with value 08H,(8sec reset)

g

;go