Archive for the ‘Hardware’ Category

Reset Reason

Saturday, September 23rd, 2006 Nigel Jones

The title of this post is rather ambiguous and can be read several different ways. This is no accident as it reflects the ambiguity that I see concerning the most fundamental event in an embedded system’s life – reset. Being a consultant, I get to write a lot of my own code. I also get to read a lot of other people’s code and the one area where I almost never see much thought given is to handling the various causes of a system reset. In the bad old days, you were reset and that was all you knew. Today, however, modern processors contain registers that may be interrogated to determine the cause of the last reset. For example, an AVR processor I am working with lists the following possible causes:
Power Up
Brown Out
External Reset
WatchDog
JTAG

Based on my experience, I’d say that 99% of the embedded systems out there don’t care what caused their last reset. This strikes me as foolhardy. At the very least, an embedded system should keep track of the number of times it has taken a watchdog reset for post deployment quality analysis (you do do this don’t you?). Furthermore, a portable system should take remedial action if it underwent a brown out reset – presumably indicating that the battery is failing. As for a JTAG reset, could this be construed as an attempt by someone to determine the inner workings of your system – and if so what should you do about it?

I have been involved in systems where support for handling the different interrupt sources has been added as an afterthought – and it shows. As a result, I’ve come to the conclusion that the only way to handle this is to think about it from the start, and to know up front what needs to be done for each of the different reset sources. If you go through this exercise, you’ll find that your startup code becomes a lot more sophisticated. You’ll also find that you’ve designed a better system – which after all is the point.

Home

Datasheet Errors

Friday, September 22nd, 2006 Nigel Jones

As someone that also designs hardware for a living, I spend a lot of time reading data sheets. Recently I have had to deal with a rash of data sheet errors. I’m not talking about minor errors. I’m talking about colossal, fundamental errors, whereby the device simply does not do what the data sheet describes. How can this be I ask myself? I think there are two possibilities:

1. I have to wonder whether this is one of the consequences of IC design being moved off-shore such that the designers of the IC are non English speakers, and consequently are in no position to proof-read the data sheet.

2. With new ICs being introduced at a phenomenal rate, is this simply the case that so much information is being generated that these sorts of errors are to be expected hence forth?

I’m inclined to think that option 2 is the more likely. If this is the case, why aren’t the engineers that are designing these parts insisting upon reading the data sheet before it’s published? The next thing you know, the software industry will expect its customers to find their bugs for them…

Home