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.
Hi @carlos_o , thank you for your reply.
I am using LPC1837.
The flag is checked at startup before interacting with any other WWDT registers. After CMSIS SystemInit completes, I setup the systick, and then check this flag.
Hi @ejg
Yes, LPC18xx has the same issue as LPC43xx.
To determine the cause of the core reset, please refer to Section 14.5.1, "Determine the Cause of a Core Reset," in the LPC18xx User Manual.
Alice_Yang_0-1784105602643.png
BR
Alic