You are on page 1of 17

Watch Dog Timer

M.SRIKANTH
CDAC-Hyderabad
Contents
1. Working principle of WDT
2. Applications
3. Registers of WDT
4. Operation modes
5. Configuration steps
working principle of WDT
Watch Dog Timer is a special timer used to
recover system from exception by resetting
processor
- during normal operation, processor should
continuously feed (Reload) WDT with in certain
limiting time.
- If system fails to feed wdt with in time limit wdt
gives time out signal and it will reset processor
Applications
- Satellites
- Automated Systems
- Military Applications
- Hard-Real time applications
Registers of WDT
● Watchdog Mode register(WMOD)
Registers of WDT
● Watchdog Timer Constant register(WDTC)

● by default it will take FF


● minimum time limit=(Tpclk*4*256)
Registers of WDT

● Watchdog Feed register(WDFEED)

sequence of 0xAA, 0x55 is required to turn on


wdt
Registers of WDT
● Watchdog Timer Value register(WDTV)

●Reading this register will get current value of


counter .
Registers of WDT
● Watchdog Timer Clock Source Selection
Registers of WDT
Registers of WDT
WDT Clock Divider and Enable
Operation modes
Two modes of operation
1) Interrupt mode 2) Reset mode
Operation modes
1) Interrupt mode: In WMOD register
WDEN =1 and WDRESET =0
when time-out flag is set control goes to handler
and interrupt flag cannot be cleared
Operation modes
2) Reset mode: In WMOD register
WDEN =1 and WDRESET =1
-Time out leads to reset
Configuration steps
1) select clock source by configuring
WDCLKSEL register
2) Disable WDT by writing 0 to WDEN bit
3) write value to WDTC
4) enable WD by writing in to WDEN
5) write 0xAA, 0x55 to WDFEED register
Questions
1) software implementation of WDT?
2) Applications of WDT?
3) operation modes of WDT?

You might also like