We are using K22FN1M0AVLQ12 processor from NXP for our product and running a bare metal software written in C language. We have external watchdog to monitor the system with a timeout of 60msec, the internal watchdog is not being used.
The external watchdog is patted at 1ms internal in PIT interrupt service routine.
When we enable the external watchdog and pat it in PIT ISR it is resetting the system.
If we pat the watchdog anywhere else it works fine but the moment we pat it in PIT's ISR as said above the external WD resets the system.
Kindly help us out on this.
Thanks & Regards,
-Krishna
Hi Krishna
I will not try to answer the question about why the external watchdog fires in one case any not in the other but instead point out that you should generally NEVER retrigger (pat) a watchdog in an interrupt routine. because it it not safe. It is first best to work out a reliable strategy in your system to avoid having a watchdog that never fires when needed - see for example http://johnsantic.com/comp/wdt.html
Regards
Mark