Back to DRIVERS page

AVR UC3 Series Software Framework: Watchdog Timer(WDT) Driver

Copyright © 2007 Atmel Corporation

Introduction

The Watchdog Timer (WDT) has a prescaler generating a timeout period. This prescaler is clocked from the RC oscillator. The watchdog timer must be periodically reset by software within the timeout period, otherwise, the device is reset and starts executing from the boot vector. This allows the device to recover from a condition that has caused the system to be unstable.

 

WDT Driver

The WDT software driver API philosophy of usage is:
  • Enable the WatchDog Timer with a time-out period [by calling wdt_enable(us_timeout_period)]
  • Periodically kick the dog [by periodically calling wdt_clear()]
  • Eventually disable the WDT [by calling wdt_disable()] or re-enable it [by calling wdt_reenable()]
  • Eventually perform a reset of the MCU through the WDT [by calling wdt_reset_mcu()].

     

    WDT Software Driver Examples for module revision below 400

    The driver is composed of wdt.c and wdt.h dedicated for module revision below 400.

    One example is available: start a watchdog and scroll leds until a reset occurs..

     

    WDT Software Driver Examples for module revision above 400

    The driver is composed of wdt4.c and wdt4.h dedicated for module revision above 400.

    One example is available: start a watchdog and scroll leds until a reset occurs..

     


    AVR is a registered trademark of Atmel Corporation.