I have a problem detecting when a watchdog reset has occurred. I am currently following the steps listed in the user guide which states:
The Watchdog time-out flag (WDTOF) can be examined to determine if the Watchdog has caused the reset condition. The WDTOF flag must be cleared by software.
Although the device resets correctly, the flag doesn't appear to be set afterwards.
I saw there was an old post related to a similar issue on the LPC4357 (Solved: LPC4357: Cannot detect watchdog reset - NXP Community), but I couldn't see anything listed in the LPC18xx errata.
Please could you confirm whether the LPC18xx suffers from the same issue as above?
Hi @ejg
Thank you for the post!
Could you please specify which LPC18xx are you using?
Also, at what time did you review the Flag?
If you call the WWDT_Init function from lpc18xx_wwdt.h it clears the interrupt flags, so the WDTOF needs to be read before.