Communication Protocols · Interview question

A UART link produces consistent garbage. What's the most likely cause?

A strong answer

A baud-rate mismatch, consistent garbage (the same wrong bytes every time for given input) is the signature, because the framing is being decoded but the sampling is systematically off. The two ends are configured for different baud rates, or one end computed its baud divider from the wrong assumed peripheral clock (a clock-tree misconfiguration, e.g., assuming the wrong APB frequency or missing the timer/UART clock relationship). Other consistent-garbage causes in the same family: mismatched frame format (data bits, parity, or stop bits differ between ends) so the receiver mis-aligns the fields. By contrast, intermittent garbage points more at noise, a missing/poor common ground, or marginal levels. The debugging order: verify both ends' baud and frame settings agree, confirm the actual UART clock matches what the baud calculation assumed (scope the bit period, at 115200 each bit is ~8.68 µs), and check the common ground. A scope or logic analyzer measuring the actual bit width immediately reveals a baud error.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

UART

Two wires, no clock, and a pre-agreed baud: the UART frame (start/data/parity/stop), how the receiver recovers timing by oversampling, and an interrupt-driven RX ring buffer.

More UART questions

Browse all 472 interview questions
A UART link produces consistent garbage. What's the most likely cause? | EmbeddedPrep.io