We are having problems with the watchdog on a LPC845.
We are trying to force a watchdog reset on purpose because there is no other way to reset the LPC845.
The problem:
On some hardware it works, on other equal hardware it simply does not trigger. Out of 50 PCB's we have about 10 failing on watchdog reset.
our code:
__disable_irq(); //Disable Interrupts
SYS_PeripheralEnableClock(SYS_PERIPHERAL_WWDT);
SYS_HardwareBlockPowerUp(SYS_POWER_HARDWARE_BLOCK_WDTOSC);
// The LPC_WWDT_T->TC value after reset (0xFF) is fine:
// that is the minimum value
LPC_WWDT->TC = 0xff; // not really needed
LPC_WWDT->MOD = 0x03; // Enable the watchdog and make it generate a
// chip reset at timeout
// Start the watchdog
LPC_WWDT->FEED = 0xAA;
LPC_WWDT->FEED = 0x55;
while (1); // on some hardware this triggers watchdog reset, on other hardware it simply stays here forever.
Hope someone knows a line of code that is required for getting the watchdog to work all the time...
>"We are trying to force a watchdog reset on purpose because there is no other way to reset the LPC845. "
I'm using the ARM System Reset to reset my LPC845, see How to Reset an ARM Cortex-M with Software | MCU on Eclipse
It works fine, and I'm using this for my LPC845-BRK board (see Unboxing the NXP LPC845-BRK Board | MCU on Eclipse ).
If you want to see it in action, see my project on GitHub: mcuoneclipse/Examples/MCUXpresso/LPC845-BRK/LPC845-BRK_Blinky at master · ErichStyger/mcuoneclipse · GitHub
Code is as below:
I hope this helps?
Erich