Content originally posted in LPCWare by Wouter on Tue Feb 17 12:05:05 MST 2015
Hi Theodore,
As long as the temperature remains more or less constant, you can calibrate the WDT oscillator against the IRC oscillator. So before you enter your power-down mode, you use the IRC to count e.g. 10ms long how many WDT counts you get, so that you know how much off it is, and use that to configure your wake-up time.
If your temperature can change significantly during that time, you could also e.g. divide the sleep time by 10 and re-calibrate the WDT each time you wake-up.
Regards,
Wouter