80 likes | 211 Views
Debugging. Michael Bruce-Lockhart. Debugging. The first 3 rules of debugging are 1. Location 2. Location 3. Location Find where the fault is Isolate subsystems Isolate factors Apply simplified test signals Write special test code. Example. Fully integrated. Feedback. +5.
E N D
Debugging Michael Bruce-Lockhart
Debugging • The first 3 rules of debugging are • 1. Location 2. Location 3. Location • Find where the fault is • Isolate subsystems • Isolate factors • Apply simplified test signals • Write special test code Debugging
Example Fully integrated Feedback +5 Lots of wires Tracking A/D Converter Block Dagram Debugging
What can go wrong? • Incorrect wiring • Broken connection • Loading • Bad Power • Bad Ground • Faulty chip • Incorrect design • Interface disagreement Debugging
Prevention • Good wiring • Robust • Well-organized • Good power and ground • Subsystems easy to isolate & test • Chips easy to replace • Design • KISS • Remember what’s critical • Well specified interfaces • Loading Debugging
Finding the problem • First objective is to localize the problem • Do cheap tests before expensive ones • check power with a scope • check grounds with an ohmmeter • check right at the pins • Substitution of parts • isolate before removing part • don’t damage the part in the removal • be careful not to blow out multiple parts • Anything can go wrong – even wires break Debugging
Develop the right attitude • Problems will occur • Perfection is not possible • Treat a fault as an engineering problem • Tackle it systematically • Use your brain – no substitute for thinking • Use your knowledge • If it’s a tough one • Walk away from it & rethink it Debugging
Finally • Document your problems • Log book • By the time you’re done you will know it thoroughly • You may forget the details a month later • It can break again Debugging