Electronic – ARM watchdog reset

armwatchdog

I have an MP3 development board I picked up from sparkfun that runs off the LPC2148 ARM processor. In looking through the code, I see a function to force a watchdog reset. My question is, how do you figure out what values to feed to the watchdog register? I looked through the LPC2148 data sheet and couldn't figure it out. I don't just want to use other people's code, I want to understand why they did what they did and how they figured out what to do.

Best Answer

This is the code I use for an LPC2148:

WDTC = 0x00000FFF; // very short timeout

WDMOD = 0x03; // watchdog resets CPU

WDFEED = 0xAA; // start watchdog

WDFEED = 0x55;