2 watchdog timer operation – Samsung S3F401F User Manual

Page 43

Advertising
background image

S3F401F_UM_REV1.00

BASIC TIMER & WDT

3-3

2.2 WATCHDOG TIMER OPERATION

The Basic Timer can also be used as a "Watch-Dog" Timer to recover the S3F401F from the unexpected program
sequence, that is, system or program operation error due to external factor. For example, the external noise can
cause this kind of situation, which means that the CPU is running the unexpected code sequence, i.e., malfunction
of CPU. To recover the CPU from the unexpected sequence, the Watch-Dog Timer should reset the CPU in case of
malfunction. But, during normal sequence, the instruction which clear the Watch-Dog Timer before the overflow of
Watch-Dog Timer (Within a given period) should be executed at the proper points in a program. If this instruction can
be executed in certain circumstance, it means the overflow of Watch-Dog Timer and it can generate the internal
reset signal generation to restart the CPU from the beginning. In summary, an operation of Watch-Dog Timer is as
follows:

• Each time BTCNT overflows, an overflow signal should be sent to the Watch-Dog Timer Counter, WDTCNT.
• If WDTCNT overflows, system reset should be generated.

NOTE

A reset signal can clear the BTCON as 0x0000. This value can enable the Watch-Dog Timer because it is
not 0xA5 (Please understand the Watch-Dog Timer can be disable when its content (WDTE field in
BTCON[15:8] register) is 0xA5). For normal program sequence, the application program should prevent the
overflow. To do this, the WDTCNT value should be cleared (by writing a "1" to WDTC bit of the Basic Timer
Control Register (BTCON[0])) before the overflow occurs.

Advertising