NMI interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NMI interrupt

2,604 次查看
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.

标签 (6)
0 项奖励
回复
4 回复数

2,487 次查看
ErichStyger
Specialist I

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

2,487 次查看
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 项奖励
回复

2,487 次查看
ErichStyger
Specialist I

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 项奖励
回复

2,487 次查看
TEMCEFF
Contributor IV

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

0 项奖励
回复