Few questions on embedded stuff

formatting link

I agree that that was probably a mis-edit by Jack and your altgernative text seems more like the spirit intended. I think you will find that in his book "The art of designing embedded systems" he has corrected the sentiments somewhat. I know it makes life more difficult when you have to read between the lines and apply correctives for what is actually written.

" "A watchdog timer is a good defense for all but the smallest embedded systems. It's a mechanism that r5estarts the programme if the software runs amok".

Later he writes "Don't use a bit of clever watchdog code to compensate for software or hardware glitches". I am presuming here that he really means deficiencies in the hardware or software design.

I am not one who blindly follows Jack on all things and we have had some quite extensive discussions over the many years we have known each other through this ng and in priovate emails.

--
********************************************************************
Paul E. Bennett ....................
Forth based HIDECS Consultancy .....
Mob: +44 (0)7811-639972 .........NOW AVAILABLE:- HIDECS COURSE......
Tel: +44 (0)1235-811095 .... see http://www.feabhas.com for details.
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett
Loading thread data ...

Hi Paul,

Yes. I guess Guy was pretty much to the point here and I assume his thoughts are similar to mine: A WDT is a good line of last defense but relying on it to "clean up messes" is not good. If it ever had to come on this event should be logged and somebody should then get to work and find out why it came on. It's the same with airbags. If one ever was activated that usually means a crash has occurred and we can be pretty certain that the police will want to find out why that happened.

Regards, Joerg

formatting link

Reply to
Joerg

Hi Guy

the use of Ps to cover up inadequate aircraft design is not.

So how about using them for sports activities? Or should I feel guilty now that I ever used one for non-emergencies?

Regards, Joerg

formatting link

Reply to
Joerg

Joerg wrote: ...A WDT is a good line of last defense but

Right. But a complex system with lots of resource locks can get into unanticipated states, and one of those might require an automatic reboot - by the WDT. - RM

Reply to
Rick Merrill

That's the answer, that horrifies me.

Andreas

--
It's not the things you don't know what gets you into trouble. It's
the things you do know that just ain't so.
- Will Rogers
Reply to
Andreas Hadler

Hi Rick,

Those complex systems require thorough documentation including resource locks, extensive design reviews and most of all strict discipline. I have seen very complicated systems that really never locked up but others mainly in the consumer software area that lock up all the time. One of the common problems whenever I was participating in SW reviews used to be that people grabbed memory space but forgot to release it back after their routines had completed. That is the stuff that leads to freezes.

A good version control system helps a lot but it won't do it all.

Regards, Joerg

formatting link

Reply to
Joerg

You could try jumping out of an airplane with and without a parachute and see which way you like it better....

Take a couple of lawyers with you.

Reply to
Guy Macon

Wouldn't that mean that you have race condition(s) in your design, and that you are relying on the automatic reboot to correct the deficiency?

Reply to
Kim Flowers (Mr.)

Missing in this discussion is an analysis of what SORT of WDOG to use :) I have worked on systems where a device reset pin was better called a Reset-request (sic), and where a pin RESET was NOT enough to cause system recovery from deliberate induce crashes. These were NOT SW lost-state failures, but were external electrical energy events. If you have a chip with a "reset-request" pin, then full power removal/recycle is needed. I have also seen time-window watchdog devices, and also Wdogs with boot-stretch timeouts .....

-jg

Reply to
Jim Granville

Here's a scenario: The device in question is thoroughly documented and carefully designed. All timings, memory, and other system resources have been carefully constructed so as to assure that no locking contention is possible. It is working very nicely, and a particularly energetic gamma particle flips just one single bit in RAM from a zero to a one. That single bit happens to be the return address from the interrupt that is now running, and so instead of returning to address

0xfe320, it now attempts to return to 0xfe300, which is in the middle of an instruction.

There are a number of possible valid approaches to countering this kind of flaw, and one of them is the use of a WDT. Bad things can happen even in very well designed systems.

OTOH, poorly designed systems will probably have poor operating characteristics whether or not a WDT is used.

Ed

Reply to
Ed Beroset

This has some interesting info on the content-reliability of SRAM:

formatting link

.. Funny how the vendors are quiet on soft-errors, until they have a structure that reduces it by some 4 digits....

-jg

Reply to
Jim Granville

Suppose you have 5 processes and 5 resources used (let's say) by each process: how many permutations would that be, and can you think of a way to check out all those timing possibilities? - RM

Reply to
Rick Merrill

Excellent example: for a sky diver the WDT is an altimeter!!! (Really and Truly) - RM

Reply to
Rick Merrill

the use of Ps to cover up inadequate aircraft design is not.

Huh? You jumped out of a perfectly good, operating airplane??? Or was it the airplane described at the end of Ganssle's WDT article?

Reply to
Ben Bradley

What chips have a "reset-request" pin instead of reset?

Reply to
Ben Bradley

Yes it does, which is why all the remote robots have a WDT: sometimes nature's timing is out of spec (or at least out of the range that you thought was sensible to test!) - RM

Reply to
Rick Merrill

It is, of course, not labeled as such, (and the IC manufacturers will usually not clearly describe it as such!), but you can find hints in the data, and aggressive testing (ESD and non-monotonic brown outs) can readily show such devices. Quite often, digital chips have a simple, FET+CAP power on reset internally, and that can deliver different reset signals from the RST pin.

-jg

Reply to
Jim Granville

If you let each process lock multiple resources at a time and different processes do this in a random order, you sooner or later end up in a deadlock situation. Using a WDT to cover this up is IMHO a design flaw.

You can often get a much cleaner design e.g. by allocating a separate "owner" process for each resource (e.g. for each hardware device) and do all the hardware access (or at least do the arbitration) in this owner process. There are far less permutations that needs to be tested and as such, might even be tested :-) before releasing the product.

Paul

Reply to
Paul Keinanen

Why don't blind people like to go skydiving?

(Answer is in tnext post. please try to guess the answer first...)

Reply to
Guy Macon

. . . . .

It scares the dog.

Reply to
Guy Macon

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.