Ext WD resetting the system when patted in PIT's ISR

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

Ext WD resetting the system when patted in PIT's ISR

474 Views
krishnad
Contributor II

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

0 Kudos
Reply
1 Reply

429 Views
mjbcswitzerland
Specialist V

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

0 Kudos
Reply