WDT Watchdog timer code

Hi Adam,

What you're doing appears completely correct, although clearing the watchdog in the early warning interrupt might cause problems, as writing to this register will take around 5 to 6 milliseconds to synchronize due to the fact that the WDT peripheral is being clocked by the 32.768kHz oscillator.