All jobs / Embedded / hardware / Debugging
Embedded / hardware interview question · 1–3 years
When do you reach for a logic analyser, and when for an oscilloscope?
The strongest answer
Analyser when the question is “are the bytes right” — many channels, a long capture, protocol decode. Scope when the question is electrical: edge shape, ringing, levels, a glitch too narrow to sample
Why it works
Exactly — they answer different questions, and the classic mistake is decoding a line that is electrically broken.
What a good answer covers
- Protocol questions: analyser. Electrical questions: scope.
- Analyser: many channels, long capture, decode.
- Scope: edges, levels, ringing, glitches.
- A bad signal decodes as plausible nonsense.
Answers that fall short
- Close, but not the strongest: The analyser decodes the protocol and the scope shows the waveform, so I would start with the analyser
Right pairing; be explicit that a decoder trusts its thresholds, so a filthy line decodes as plausible nonsense. - Weak: The analyser is the modern tool; a scope is only needed for analogue circuits
A digital line is an analogue signal with expectations; rise time, ringing and levels are scope questions. - Red flag: I would add more printf lines instead — the instruments take too long to set up
printf changes the timing and hides the bug you are chasing; the probe that does not disturb the system wins.
Who gets asked this
More Debugging questions
- HardFault on Cortex-M. What do you capture before you “add a print”?
- What should a field build do on a failed assert?
- Datasheet says 400 kHz I2C; the line looks filthy at 100. What wins?
- A struct field changes value minutes into a run, and nothing in the code writes to it. How do you find the…
- What do you log in the field when flash is tiny?
- A fleet starts resetting in the wild. First staff hour?
- What is SWD, and how does it differ from JTAG?
- A bug vanishes when you add printf. What did you learn?