Interview Question · Concept
The Baud Mismatch Budget
The Question
The interviewer asks
Your UART and its peer run from different clocks. How much baud-rate mismatch can the link tolerate, and which bit fails first?
You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Drift is zero at each start edge and grows with every bit. So the last sample, the stop bit, fails first. A receiver that samples exact bit centres has half a bit of slack over the nine bits before the stop. That is about ±5.6 %, shared by both ends. Real receivers do worse: the site's bench receiver first loses 8N1 frames at +4.5 % and −6 %. The 8E1 format fails earlier, because parity puts the stop bit one bit later.
- 8N1
- 8E1
- 8N2
Read the plot as a table
| Transmitter rate error | 8N1 | 8E1 | 8N2 |
|---|---|---|---|
| -8% | 0 | 0 | 9 |
| -6% | 0 | 0 | 64 |
| -4% | 64 | 64 | 64 |
| -2% | 64 | 64 | 64 |
| 0% | 64 | 64 | 64 |
| 2% | 64 | 64 | 64 |
| 4% | 64 | 52 | 64 |
| 6% | 7 | 4 | 5 |
| 8% | 0 | 1 | 2 |
Measured, 64 frames per step, back to back. 8N1 first loses frames at −6 % and at +4.5 %, and 8E1 fails one step earlier on both sides.
Read the diagram as text
- Rate error e: TX bit = 16 × (1 + e) ticks
- Drift: 16·e·k ticks at sample k
- Stop sample: largest k, drifts most
- Slow side, e > 0: room to the start of the bit
- Fast side, e < 0: room to the end of the bit
- Rate error e → Drift
- Drift → Stop sample
- Stop sample → Slow side, e > 0: early sample
- Stop sample → Fast side, e < 0: late sample
The budget is about half a bit spread over the frame, split by where the sample sits.
Drift
A transmitter bit longer by a fraction e ends 16·e·k ticks late at bit k. The stop bit has the largest k.
Slow side
The stop bit starts at 144·(1 + e) ticks; the centre sample is at 152. It reads data 7 once e passes 8/144, about 5.6 %.
Fast side
Data 7 ends at 144·(1 + e); its sample is at 136. Past about −5.6 % it reads the stop bit: wrong data, and with an idle line after, no flag.
Both ends
Divisor rounding plus the peer's oscillator: 115200 from 50 MHz with divisor 27 is already +0.47 %.
e = +4.5 %: RX 55 ok e = +5.5 %: RX 55 ok e = +6.0 %: RX 55 FE e = -5.5 %: RX 55 ok e = -6.0 %: RX d5 okSelf-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer says the stop bit fails first because drift grows from the start edge. It says both ends share a budget of roughly 5 %.
What Interviewers Listen For (Mid-Level)
A good mid-level answer derives the drift as 16·e·k ticks at bit k, and knows parity shrinks the budget. It adds divisor and oscillator error, and knows a fast transmitter can corrupt data with no framing error.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfProve ItScale It
- The Baud Mismatch Budget
-
WhyWhy the Stop Bit Fails FirstL1 Junior
Why is it the stop bit that fails, and not data bit 0?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
The start edge is the only moment both ends agree on, and drift is zero there. Each later bit adds the same timing error. So the sample furthest from the start edge, the stop sample, has drifted most. This is also why the receiver restarts its count on every start edge. The error never carries from one frame to the next.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer says drift grows evenly from the start edge and resets with every new frame.
-
What IfDoes a Second Stop Bit HelpL2 Mid-Level
Would switching to two stop bits give you more tolerance?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
It helps only on the fast side, and only when frames stream back to back. There, with a fast transmitter, the stop sample comes late and can land in the next start bit. It then reads 0. A second stop bit puts idle time there instead. With idle time between frames it buys nothing: the P6.4 sweep shows 8N1 and 8N2 failing at the same steps.
Measured sweepThe Same Sweep with an Idle Bit Between FramesOne idle bit plus a seeded fraction of a tick before every frame. Compare 8N1 and 8N2 on the fast side. - 8N1
- 8E1
- 8N2
Read the plot as a table
Transmitter rate error 8N1 8E1 8N2 -8% 9 5 9 -6% 64 43 64 -4% 64 64 64 -2% 64 64 64 0% 64 64 64 2% 64 64 64 4% 64 48 64 6% 5 4 7 8% 2 0 2 Measured with an idle bit between frames. 8N1 and 8N2 first lose frames at the same steps, −6.5 % and +4.5 %.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer says a second stop bit helps only on the fast side, with frames back to back. It cites the measured sweep: with idle gaps there is no gain.
-
Scale ItSigning off a UART Link BudgetL2 Mid-LevelL3 Senior
Your SoC talks to a module clocked by an RC oscillator. How do you sign off that the UART link works across temperature and parts?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Add up the error sources: this end's divisor rounding and clock tolerance, and the peer's oscillator tolerance over temperature and voltage. Compare the sum, in both directions, with the receiver's measured budget for the frame format in use, not a quoted 5 %. In simulation, sweep the peer rate in fine steps, both ways, in every supported format. Run frames back to back and with gaps. Record the first failing step as the sign-off number.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer adds up the errors of both ends. It compares them with the budget for the frame format really in use.
What Interviewers Listen For (Senior)
A good senior answer demands a measured first failing step, for each format and direction, as the sign-off number. It leaves margin for a receiver that samples early or late.
-
WhyWhy the Baud Budget Is LopsidedL2 Mid-LevelL3 Senior
Why is the measured 8N1 budget +4.5 % on one side and −6 % on the other, not ±5 %?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
A rate error moves each sample further from its bit centre, and the stop bit moves most. The total room is about half a bit over the frame. A receiver that samples a little before the centre has less room on one side and more on the other. So quote the budget with its receiver, format and pacing.
Self-Check
Tick each key point you covered in your answer.
Misconception
"Every UART tolerates ±5 %."
The budget depends on the frame format and where the receiver samples. The lesson receiver measured +4.5 % and −6 % for 8N1.
Source ASIC Point lesson P6.4 (measured)
-
Prove ItSolve P6.4.1: A Receiver That Survives the SweepSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
What People Get Wrong
Common wrong answers and why they fail.
Missed Corner
"A rate error always shows up as a framing error."
That holds only on the slow side. A fast transmitter sends the stop bit early, so the data 7 sample reads it. If the line idles after the frame, the stop sample still reads 1. In the run, −6 % delivers D5h for 55h with no flag.
Source This question's run (Icarus Verilog 12): at −6 % it delivers D5h with no flag
Half-Truth
"Each end may be off by 5 %."
The budget belongs to the link, not to each end. Divisor rounding at one end and the peer's oscillator error add up. Real receivers also have less than the ideal ±5.6 %.
Misconception
"Adding parity makes the link more robust to clock error."
Parity makes the frame longer, so the stop sample sits one bit further from the start edge. In the P6.4 sweep, 8E1 first fails at +4 %, and 8N1 at +4.5 %.
Source ASIC Point lesson P6.4 (measured sweep): 8E1 first fails at +4 %, 8N1 at +4.5 %