MCF52223. Is a solid watchdog possible on a MCF52223 MCU?

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

MCF52223. Is a solid watchdog possible on a MCF52223 MCU?

2,743 次查看
Claude_Sylvain
Contributor I
Hello,

Accordingly to the MCF52223RM.pdf Rev.3 document, section 11.5.4, first paragraph, it seem to be possible to configure de MCU watchdog to generate an hardware reset.

However, accordingly to the same document, same section (11.5.4), table11-6, CWRI bit field description, it seem that the only way to use the watchdog to reset the MCU is by configure it to generate an interrupt on watchdog timer time-out, and do a soft reset in the corresponding interrupt service routine.

At first glance, I was thinking that configuring the interrupt level and priority of the watchdog interrupt (ICR8 of INTC0) higher that the higher interrupts present on the system will to the trick of getting a watchdog system solid as a rock.  But unfortunatly, there is a case where this trick do not work at all.  When a function using critical region (all interrupts disabled), is called; if the MCU get stucked into that critical region , the watchdog system will never be able to do their job (reset the MCU).

So now, my question:  Am I missing something, or is it possible that the only way to get a solid watchdog system with that processor, is to add an external watchdog circuit?


Regards,
Claude Sylvain
Electro-Technica inc.



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

858 次查看
bkatt
Contributor IV


Claude_Sylvain wrote:
...  But unfortunatly, there is a case where this trick do not work at all.  When a function using critical region (all interrupts disabled), is called; if the MCU get stucked into that critical region , the watchdog system will never be able to do their job (reset the MCU).



The highest interrupt level (7) is not maskable, so if you use that, the watchdog interrupt should occur regardless of other interrupts being disabled. There might still be problems if the the bus or the stack pointer get screwed up so badly that the ISR can't run.
0 项奖励
回复

858 次查看
Claude_Sylvain
Contributor I
Hello bkatt,

You're right, I forgot the level 7 (non-maskable) interrupt.

So, the problem is not as worst as I was especting.


Claude.


0 项奖励
回复

858 次查看
Claude_Sylvain
Contributor I
Hello Mark,

Thank you for the 2 forum articles references.

Just to say that I got to the reset problem on the MCF52223 ColdFire processor after experiencing a total MCU hang, even if the watchdog was enabled.
The MCU hang after getting in multiple address exception error, due to stack data corruption.

Even after configuring the SWTI interrupt to level 7 (non-maskable), the watchdog have still no effect when the MCU get address exception error.

So, accordingly to the multiple articles found in this forum, and my personnal experiment, it is clear that an external watchdog circuit is necessary when using the MCF52223 in critical process.


Claude.


0 项奖励
回复