A primer on debugging: Approaches and techniques
Keywords:Scopes debug LVDS DDR
Do we change our approach when faced with different types of debug chores? We might be:
Debugging a prototype
Determining the cause(s) of a field failure – or a high production dropout rate
Fixing some old gear in our lab (tell me about it)
What else?
Where to start debugging? If you're not familiar with the design, schematics are a good place. Obviously, the approach will vary, depending on whether it's your design or someone else's, your existing level of familiarity, etc. I study schematics, both to understand the product and to look for potential design problems. Even if it's your own work, looking at it a few months later with fresh eyes may reveal a slip-up or two! Is there really enough current available from your supplies? Is there enough decoupling? Is that amplifier actually an oscillator? Things like that.
Before I even think about gathering test gear, I inspect the buggy subject. If it needs disassembly, do it carefully, noting any problems that show themselves. Is it failing because a cable is being pinched or bent? Is there a loose screw!? Are there any strange smells? (Once you've nosed burnt tantalum, you'll never forget it.)
The board is now in your hands. Take a minute or two to just look at it. Take a bit more time with a magnifier. You may find something obvious:
Missing parts
Burn marks
Bad soldering
Wrong parts
Mechanical damage
PCB problems
OK, it's time to set up some equipment. What do you have at your bench? I like to have a scope (with suitable probes), DMM, any required power supplies, and maybe some more specialised component testers, like an LC meter and ESR meter (especially for working on old gear). You may need a computer, too.
Many less experienced troubleshooters jump right into probing signals with their scopes. I've seen hours wasted because of this. Check the basics first! Measure all the power rails with your DMM. Are they all in tolerance? Look with your scope, too. Are they clean enough? Check the current draw. Is it at the expected level? Some kinds of analogue circuits can be extra-tricky, as there may be more interactions than you'd like between elements or stages. A misbehaving signal might feed back, creating loops and difficult-to-isolate causes and effects. If necessary, don't be afraid to break some connections to isolate a circuit section.
Got high-speed digital or high-frequency analogue or RF signals? Verify the signal integrity of all lines. I once worked on a camera that had a flat cable between two boards. All the LVDS signals were beautiful, but a 3.3V sync signal had horrendous under and overshoot. The cause turned out to be a combination of: where the signal had been assigned on the cable, and the signal driver design. It wasn't the immediate cause of any problems, but would likely have started causing field failures.
Related Articles | Editor's Choice |
Visit Asia Webinars to learn about the latest in technology and get practical design tips.