Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2100] Re: Stack checking

2004-01-27 by Lewin A.R.W. Edwards

> interrupts generated by the watchdog timer were not serviced. Unless 
> there was some additional interaction with the application code, it 
> could entirely fail to detect a locked system.

Well, that's the problem with any WDT implementation, really - you've 
got an exceedingly dumb peripheral that needs to have your intentions 
communicated to it, and the intention you need to communicate is "reset 
the system if it's not working as I intended". Quite a tall order.

> Very cunning - I like it! I did have some implementation 
> observations/questions but I can see I'm going way off-topic ;)

I don't think it's OT for this listserver. WDT usage in multitasking 
environments is highly relevant to ARM in general. And in particular for 
parts like the LPC21xx, which are designed for deeply embedded control 
functions, system reliability and fast recovery time are potentially 
very interesting and on-topic issues!

The method I described is imperfect, of course - I haven't heard of a 
perfect method. One of the main downsides is that you need to perform a 
lot of real-world code analysis to determine exactly how large to make 
the "run buffer". You also need to choose very carefully exactly where 
in each task you should update the task running buffer. These analyses 
need to be revisited when you update the code, also.

Tasks that can block for a long time (e.g. waiting for a keystroke) are 
hard to monitor with this system, unless you add additional logic to see 
if the task is blocked on an OS service [but then how do you know the 
underlying driver isn't crashed... the solution I prefer is always to 
use asynchronous I/O and periodically poll for completion, updating 
system health indications every time I poll to indicate that I'm not 
really dead, just waiting].

But I think that once it's properly tuned, it's quite capable. It also 
allows the system to recover individual tasks, if possible - which means 
increased availability on a device that takes a long time to reboot.

-- 
  -- Lewin A.R.W. Edwards (http://www.zws.com/)
Learn how to develop high-end embedded systems on a tight budget!
http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.