LPC4078 Watchdog timer always resets

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4078 Watchdog timer always resets

1,283 Views
billbrown
Contributor I

Its always the simple things that get you.

During initialization I init the watchdog as follows....

Chip_WWDT_Init(LPC_WWDT);

Chip_WWDT_SetTimeOut(LPC_WWDT, WDT_OSC / 1);                  // 1 second till reset

Chip_WWDT_SetOption(LPC_WWDT, WWDT_WDMOD_WDRESET);

Chip_WWDT_Start(LPC_WWDT);

Then as the program is running I do a ...

Chip_WWDT_Feed(LPC_WWDT);          // every 10 mSec

The problem is that it always resets after 1 second.  In the debugger, I see the WWDT_Feed() , loads the 0xAA, then 0x55 in plenty of time but the TV register doesn't get set back to the TC setting.

The LPC4078 seems only to have the dedicated watchdog oscillator and it is taking about 1 second to reset. 

Any thoughts?

0 Kudos
Reply
1 Reply

973 Views
billbrown
Contributor I

Fixed it.

I needed to add the following to the init routine.

Chip_WWDT_Init(LPC_WWDT);

Chip_WWDT_SetTimeOut(LPC_WWDT, WDT_OSC / 1);                  // 1 second till reset

Chip_WWDT_SetWindow(LPC_WWDT, 0);                                      //necessary

Chip_WWDT_SetOption(LPC_WWDT, WWDT_WDMOD_WDRESET);

Chip_WWDT_Start(LPC_WWDT);

You must insure that the window feature is not preventing the feeding of the dog to occur.

0 Kudos
Reply