Using the watchdog on LPC122x

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by IanJames on Thu Jun 20 07:03:21 MST 2013

I would like to use the watchdog timeout feature on the LPC1224.

Using CMSIS I have removed the define symbol __DISABLE_WATCHDOG and recompiled. Now when I program the device as expected the device does continual resets.

I assumed that 'feeding' the watchdog timer thus:

LPC_WWDT->FEED = 0x55;

would prevent the resets - alas it does not.

The startup code source file  states this:

// ************************************************************
// The LPC12xx family start up with the Windowed Watchdog timer
// enabled, and if the application code does not continually
// feed the WWDT, then a reset will occur. This behavior will
// prevent the debug tools functioning correctly - and thus
// when a debug connection is made, the tools will disable the
// WWDT. However this will mean that behavior of your application
// may be different depending upon whether the debugger is
// connected or not. The below code will disable the WWDT in the
// same way that the debugger does, so that behavior will not
// depend upon whether the debugger is connected or not.
// If you do not want to connect the debugger to the target and
// require the default LPC12xx WWDT operation, then undefine the
// For more information, see the LPC12xx User Manual.

which I understand.

Can anyone explain what the default settings are for the Windowed Watchdog timer are and what I need to do to prevent the resets.