
GOT115-319
User’s Manual
Watchdog Timer & DIO Programming
41
Appendix A
Watchdog Timer & DIO
Programming
About Watchdog Timer
Software stability is a major issue in most applications. Some embedded systems are not
watched by humans for 24 hours. It is usually too slow to wait for someone to reboot when a
computer hangs. The system needs to be able to reset automatically when things go wrong.
The watchdog timer gives us that solution.
The watchdog timer is a counter that triggers a system reset when it counts down to zero from
a preset value. The software starts the counter with an initial value and must reset it
periodically. If the counter ever reaches zero which means the software has crashed, the
system will reboot.
How to Use Watchdog Timer
The I/O port base addresses of the watchdog timer are 2E (hex) and 2F (hex). The 2E (hex)
and 2F (hex) are address and data port respectively.
Assume that program A is put in a loop that must execute at least once every 10ms. Initialize
the watchdog timer with a value bigger than 10ms. If the software has no problems, the
watchdog timer will never expire because software will always restart the counter before it
reaches zero.
Содержание GOT115-319
Страница 6: ...vi This page is intentionally left blank ...
Страница 10: ...GOT115 319 User s Manual 4 Introduction 1 3 Dimensions GOT115 319 outlines and dimensions ...
Страница 50: ...GOT115 319 User s Manual 44 Watchdog Timer DIO Programming ...
Страница 51: ...GOT115 319 User s Manual Watchdog Timer DIO Programming 45 ...