Watchdog (Reset) on M5223X / M5213

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Watchdog (Reset) on M5223X / M5213

4,793件の閲覧回数
mjbcswitzerland
Specialist V

Hi All

 

I would like to know a little more about the software watchdog in the above processors - this is taking on from the previous (but now quite old) posting http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=776&query.id=13063#M7...

 

The present understanding is that it is not possible to program the core software watchdog in these devices to cause a reset in order to recover from a problem (software runaway). It is necessary to activate the corresponding interrupt routine and to command a soft reset from it.

 

I have just programmed this and also set the priority of this interrupt as the highest in the system.

 

There remains one question. What happens when a problem exists in a section of code which disables all interrupts? Wouldn't it mean that the core sw watchdog timer will timeout but its interrupt never handled? Is this not quite a risk??

 

Any ideas?

 

Regards

 

Mark Butcher
www.mjbc.ch / www.uTasker.com

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

1,980件の閲覧回数
Nouchi
Senior Contributor II
Hi,

Unfortunatly, you can only do a soft Reset (MCF_CIM_RCR_SOFTRST), and I if you program is blocked in a critical section, the cpu core will never be reinitialized and the program is definitely deadlocked, so you have to avoid loops in critical regions.


Emmanuel,

0 件の賞賛
返信

1,979件の閲覧回数
jvantol
Contributor I
If you have the option, an external watchdog, or watchdog/voltage regulator IC can be a great solution to this problem. Depending on your requirements for the power supply, this can be close to cost neutral.
0 件の賞賛
返信

1,980件の閲覧回数
Petter_fupp
Contributor I
Why not use level 7 for the watchdog interrupt? It should be non-maskable.
0 件の賞賛
返信

1,979件の閲覧回数
mjbcswitzerland
Specialist V
Hi Petter

You are correct, the Interrupt level 7 assigned to an interrupt gives it NMI qualities and so this is a solution which has been adopted in the meantime.

There is still a small risk involved since if the interrupt vector is in SRAM and this gets corrupted by a runaway program the NMI interrupt will fire but fail itself - so there is still no 100% secure method of recovering from a fatal program error through a reset. i.e. if the runaway program writes something to the watchdog interrupt vector it will result in the board hanging forever with no automatic reset recovery (apart from when an external supervisor is utilised...)

Regards

Mark

www.uTasker.com

0 件の賞賛
返信