NMI interrupt

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

NMI interrupt

1,289 Views
TEMCEFF
Contributor IV

Can any help me, how to configure watchdog as NMI interrupt. Whenever my code went into hardfault, watchdog unable to reset it. Hardfault has -1 interrupt priority and NMI has -2 interrupt priority.

Thanks and Regards,

Muralidhar.

Labels (6)
0 Kudos
4 Replies

1,172 Views
ErichStyger
Senior Contributor V

I don't understand the need for this?

What device are you using (but think this applies to any Cortex-M anyway?)?

If the watchdog is not kicked, it will cause a reset, and reset has a priority of -3 which is even lower than NMI (-2) and Hardfault (-1), see ARM Cortex-M, Interrupts and FreeRTOS: Part 1 | MCU on Eclipse 

I can say that at least on the Kinetis implementation I'm always able to get out of a hard fault with the watchdog?

I hope this helps,

Erich

1,172 Views
TEMCEFF
Contributor IV

If your program went to hardfault handler, your watch dog doesn't work because hardfault has highest priority than watchdog. If we configured watchdog as NMI we can reset the processor even though it is in hardfault handler.

I'm using LPC1769 controller. 

0 Kudos

1,172 Views
ErichStyger
Senior Contributor V

Are you sure? This is certainly true if you rely on the Watchdog interrupt. But the watchdog itself will drive reset which has the highest priority. I can confirm this at least for other Cortex-M (I don't know for the LPC1769).

0 Kudos

1,172 Views
TEMCEFF
Contributor IV

I'm sure. LPC1769 is Cortex-M3 series controller.

0 Kudos