Page 178 - The Art of Designing Embedded Systems
P. 178
CHAPTER 8
Troubleshooting
There comes a time in any project when your new design, both hard-
ware and software, is finally assembled, awaiting your special expertise to
”make it work.” Sometimes it seems like the design end of this business is
the easy part; troubleshooting and debugging can make even the toughest
engineer a Maalox addict.
You can’t fix any embedded system without the right world view: a
zeitgeist of suspicion tempered by trust in the laws of physics, curiosity
dulled only by the determination to stay focused on a single problem, and
a zealot’s regard for the scientific method.
Perhaps these are successful characteristics of all who pursue the
truth. In a world where we are surrounded by complexity, where we deal
daily with equipment and systems only half-understood, it seems wise
to follow understanding by an iterative loop of focus, hypothesis, and
experiment.
Too many engineers fall in love with their creations only to be con-
tinually blindsided by the design’s faults. They are quick to overtly or sub-
consciously assume that the problem is due to the software (and vice
versa), the lousy chips, or the power company, when simple experience
teaches us that any new design is rife with bugs.
Assume it’s broken. Never figure anything is working right until
proven by repeated experiment; even then, continue to view the “fact” that
it seems to work with suspicion. Bugs are not bad; they’re merely a test of
your troubleshooting ability.
Armed with a healthy skeptical attitude, the basic philosophy of de-
bugging any system is to follow these steps:
165

