Interview Question · Concept
Sharing MISO Between Peripherals
The Question
The interviewer asks
Three SPI peripherals share one MISO line. What must each do when its chip select is high, and what goes wrong if one does not?
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
A deselected peripheral must put MISO in high impedance, so only the selected one drives it. The W25Q128JV floats its outputs whenever /CS is high. If a deselected device keeps driving, two outputs fight. Simulation shows x on the bits where they disagree. A board shows mid-rail levels, wrong bits and extra current. Clock, MOSI and MISO are shared; each device has its own active-low select.
- Correct
p0 is selected and drives; p1 and p2 hold their outputs at z. The controller reads p0 alone.
- The twin
p1 keeps driving although deselected. Wherever p0 drives 1 and p1 drives 0 the line is x: p0's A5h reads x0x00x0x.
Read the diagram as text
- Controller: CLK, MOSI, CS0..CS2
- p0: selected: drives MISO
- p1: deselected: releases
- p2: deselected: releases
- MISO: one driver at a time
- p0 → MISO: oe[0] = 1
- p1 → MISO: oe[1] = 0
- p2 → MISO: oe[2] = 0
- MISO → Controller
Arrows are drivers onto MISO. CLK and MOSI fan out from the controller to all three and are not drawn.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer says a deselected device puts MISO in high impedance, and each device has its own select. It knows two drivers on one line fight.
What Interviewers Listen For (Mid-Level)
A good mid-level answer checks it with a wire rule: MISO is z while every select is high. It knows the output-disable time limits when the next device may drive, and compares a daisy chain.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
What IfProve ItCompareScale It
- Sharing MISO Between Peripherals
-
CompareSeparate Selects or a Daisy ChainL1 JuniorL2 Mid-Level
Compare one chip select per device with a daisy chain.
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
Separate selects cost one pin per device, but let you talk to any device alone, at its own mode and length. A daisy chain uses one select, and each device's output feeds the next device's input. So the chain is one long shift register, and every update shifts through every device. One broken device breaks the chain, and every device must support pass-through. It suits strings of identical parts, such as LED drivers or shift registers.
A Daisy Chain: Three 8-bit Registers, One 24-bit Shift RegisterOne select for all three. MISO of each device feeds MOSI of the next, and the last device drives the controller's MISO. Illustrative sequence- One 24-clock frame
The first byte sent travels furthest: after 24 clocks 11h sits in p2, 22h in p1, 33h in p0.
- What comes back
Meanwhile the old contents shift out of p2 into the controller, oldest first.
Read the diagram as text
- Controller: sends 11h, 22h, 33h
- p0: ends up with 33h
- p1: ends up with 22h
- p2: ends up with 11h
- MISO: last device to controller
- Controller → p0: MOSI
- p0 → p1: q0
- p1 → p2: q1
- p2 → MISO
- MISO → Controller
Arrows are the path of the bits. Measured: p0 33, p1 22, p2 11.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer weighs the pin count against being able to reach each device alone.
What Interviewers Listen For (Mid-Level)
A good mid-level answer says the frame grows with the chain and one failed device breaks it. It knows every device must support pass-through.
- One 24-clock frame
-
Prove ItSolve P7.4.2: Load Three Devices Through One ChainSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
What IfSwitching from One Device to the NextL2 Mid-Level
How soon after one select rises may the controller select another device and read it?
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 first device needs its output-disable time to let go of MISO: 7 ns maximum (tSHQZ) on the W25Q128JV. The next device's first driven bit must come later than that. The same device also has its own minimum deselect time before it accepts a new command. On that flash it is 10 ns after a read and 50 ns after a program, erase or write.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer names two limits. One is the old device's output-disable time; the other is a device's minimum deselect time.
-
Scale ItVerifying an SPI Flash ControllerL2 Mid-LevelL3 Senior
You verify a QSPI flash controller that does reads, page programs and erases. What is in your bench, and which bugs would still escape?
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
Use a wire monitor for every supported mode and lane width. Add wire checks that need no data: idle level, MISO and IO release, CS timing and whole bytes on writes. A strict flash model refuses what the datasheet forbids: programs without WEL, quad reads with QE clear, commands while BUSY. A scoreboard compares readback with a reference memory. Bugs escape through a lenient model, page-wrap writes, off-by-one dummy counts and turnaround timing.
The Bug-Hunt BenchStimulus programs drive the controller; the flash answers; the checker watches the enables; each program reads its result back. Illustrative sequence- The wire eye
The checker reads both enables on every clock. It catches a fight for the lanes and nothing else.
- The readback eye
Each program knows what the flash should hold and reads it back. It catches what the flash did, legal wire or not.
- The record
The flash prints a line per command. It rules on nothing; it is the evidence the other two eyes point at.
Read the diagram as text
- Stimulus programs: seven tasks
- Controller: six faults
- Flash model: five faults
- Contention checker: ctrl_oe & flash_oe
- Readback: data ok or WRONG
- Flash trace line: command, clocks, bytes
- Stimulus programs → Controller: task calls
- Controller → Flash model: pins
- Controller → Contention checker: ctrl_oe
- Flash model → Contention checker: flash_oe
- Flash model → Flash trace line
- Stimulus programs → Readback: expected bytes
Arrows are calls, pins and the values each observer reads.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer names the parts of the bench: a wire monitor, wire checks, a flash model and a readback scoreboard.
What Interviewers Listen For (Senior)
A good senior answer insists the flash model is tested with stimulus the datasheet forbids. It builds a matrix of faults against test programs and covers mode, lane width, command and boundary.
- The wire eye
-
Prove ItSolve P7.10.1: Check the Controller and Its Flash ModelSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
Prove ItShowing the Flash Bench Catches Each FaultL2 Mid-LevelL3 Senior
Prove it: how do you show that your QSPI bench catches each class of fault, not just that the tests pass?
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
Plant one fault per class, such as a missing WEL, a late IO release or a page-wrap error. Run every test against every fault and record which check fires. A fault with no mark is a hole, so add a program for it. On the lesson bench the wire checker caught 1 fault of 11, and readbacks caught the rest.
Self-Check
Tick each key point you covered in your answer.
Tool as Truth
"The wire checker is clean, so the controller is right."
Most flash faults keep the wires legal. Only a readback against the datasheet rule shows what the flash did.
Source Lesson P7.10 key points
-
Prove ItSolve P7.4.1: Release MISO When DeselectedSimulator-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
"If two devices drove MISO, every simulation would show x."
x appears only on bits where the two drivers disagree. Equal bits look clean, and a 2-state simulator (only 0 and 1) shows no x at all. So a test that reads matching data can hide contention. Check the release explicitly.
Source ASIC Point lesson P7.4 (measured contended byte on Icarus Verilog 12; contention shows x wherever the two drivers disagree)
Half-Truth
"Devices with different SPI modes cannot share a bus."
They can. Only one device is selected at a time. The controller reprograms CPOL and CPHA between frames for the device it selects.