123 Main Street, New York, NY 10001

Full/Half/3-Wire SPI: SDIO Multiplexing & Direction Control

← Back to: I²C / SPI / UART — Serial Peripheral Buses

3-wire SPI is reliable only when SDIO drive ownership is strictly exclusive: enforce a defined Hi-Z turn-around window and a deterministic first-byte/dummy policy.

Use measurable TA budgets, bounded timeouts/recovery, and phase-aware logs so contention becomes preventable and diagnosable.

Scope & Definitions: Full / Half / 3-Wire SPI

This page defines signal ownership and direction handoff across Full-duplex, Half-duplex, and 3-wire (SDIO) SPI variants. The focus is direction control, turn-around (TA), tri-state windows, contention failure modes, and verification hooks.

Common misconception (scope lock)
  • “3-wire” describes physical wiring + ownership switching (SDIO), not “3-bit” data width.
  • Half-duplex describes time-division (TX phase vs RX phase), which may exist with separate lines or a shared line.
Definitions (engineering view)
Full-duplex (MOSI + MISO)
  • Wires: MOSI and MISO are separate.
  • Ownership: MOSI is master-driven; MISO is slave-driven (natural mutual exclusion).
  • Time organization: TX/RX can overlap by clocking; actual overlap depends on device protocol.
Half-duplex (time-division TX/RX)
  • Wires: may still have separate MOSI/MISO, but only one direction is valid per phase.
  • Ownership: direction changes across phases; TA/dummy cycles may be required by device.
  • Time organization: command/address → TX phase → TA → RX phase (or reverse).
3-wire (SDIO shared line)
  • Wires: SDIO (shared data), SCLK, CS (plus optional OE/DIR control).
  • Ownership: SDIO is master-driven in some phases and slave-driven in others (explicit handoff required).
  • Time organization: must define TA + tri-state window to prevent contention (bus fight).
What differs (this page’s core)
  • Direction control: when and how SDIO changes between TX and RX.
  • Turn-around (TA): the required gap for one driver to release and the other to safely take over.
  • Tri-state window: the “Hi-Z” interval that prevents overlap driving.
  • Contention risk: failure modes caused by overlap driving (wrong data, heating, EMI anomalies).
  • Phase organization: command/address/TA/data partitioning and who owns SDIO in each phase.
Scope guard (not expanded here)
  • CPOL/CPHA modes: define sampling edge, but do not define SDIO ownership. → link to the “CPOL/CPHA Modes (0–3)” subpage
  • SCLK quality & skew: affects sampling margin, separate from direction handoff rules. → link to the “SCLK Quality & Skew” subpage
  • Long-trace SI / termination: deals with reflections/edge integrity; this page focuses on ownership timing. → link to the “Long-Trace SI” subpage
  • DMA & throughput tuning: system throughput optimization is handled elsewhere. → link to the “DMA & High Throughput” subpage
Quick comparison (for scoping and expectations)
Dimension Full-duplex Half-duplex 3-wire (SDIO)
Wires / pins MOSI + MISO + SCLK + CS Often same pins, but TX/RX are time-division SDIO + SCLK + CS (optional OE/DIR)
Ownership model Naturally separated (low contention risk) Phase-dependent direction (protocol-driven) Explicit handoff required (highest contention risk)
Required TA / Hi-Z Usually none for ownership May require dummy/TA by device spec Always plan TA + tri-state window
Primary limiter Sampling margin + device timing Phase scheduling overhead TA budget + handoff correctness
Typical failure mode Mode mismatch, sampling timing issues Missing dummy/phase rule, direction phase error Contention (bus fight), wrong ownership timing

Note: “primary limiter” is stated at the ownership/timing level. Signal-integrity-specific limits belong to the dedicated SI subpage.

Full vs Half vs 3-wire SPI wiring overview Three-column box diagram comparing full-duplex, half-duplex, and 3-wire SDIO SPI with ownership, tri-state window, and contention risk markers. Full-duplex Half-duplex 3-wire (SDIO) Master Slave Master Slave Master Slave SCLK/CS SCLK/CS SCLK/CS MOSI MISO Ownership is separated TX phase then RX phase Direction changes by phase SDIO TA (Hi-Z) DIR/OE ! Handoff correctness is critical Legend: DIR/OE = direction/tri-state control point; TA(Hi-Z) = turn-around high-impedance interval; “!” = contention risk

When to Use Which: Decision Rules & Tradeoffs

Selecting Full-duplex, Half-duplex, or 3-wire SPI is primarily a choice about pin budget, throughput pattern, and verification risk. Use the rules below to converge quickly, then validate direction handoff with a turn-around margin check.

Why 3-wire is attractive (and what it costs)
  • Pin/connector savings: fewer data pins, simpler connectors, fewer isolation channels.
  • Cable/route simplification: fewer high-activity nets reduces routing congestion and potential coupling hotspots.
  • System-level cost: fewer channels may reduce BOM and assembly complexity.
  • Cost trade: direction control + TA constraints increase firmware/verification burden and raise the risk of intermittent faults.
Fast decision rules (practical)
  • Choose Full-duplex when sustained throughput matters, bidirectional exchange is frequent, or lowest handoff risk is required.
  • Choose Half-duplex when traffic is naturally phased (write then read), devices mandate dummy/TA cycles, or direction changes are infrequent but acceptable.
  • Choose 3-wire (SDIO) when pin/isolation/channel cost dominates and the design can enforce strict SDIO ownership, safe defaults, and robust TA margin.
  • Avoid 3-wire when multi-slave collisions are likely, streaming is required, or validation bandwidth is limited (intermittent contention is expensive to chase).
Answer these inputs (yes/no) before committing to 3-wire
  • Read-heavy or write-heavy? Direction handoff cost scales with how often the bus changes owners.
  • Streaming required? Continuous, low-latency streams often favor Full-duplex or well-structured Half-duplex.
  • Shared bus with many slaves? Shared SDIO raises collision risk; strict CS discipline is mandatory.
  • Cross-board / cable involved? Handoff margins become more sensitive; prioritize ownership correctness and recovery hooks.
  • Validation budget available? 3-wire demands explicit contention testing and TA margin verification across corners.
If 3-wire is selected, these are non-negotiable
  1. Ownership contract: define who drives SDIO in each phase (CMD/ADDR/DATA) and enforce it.
  2. TA + Hi-Z window: explicitly allocate turn-around time (threshold placeholder: TA ≥ X ns).
  3. Safe defaults: power-up and reset must default SDIO to input/Hi-Z until ownership is proven.
  4. Contention containment: add practical protection (e.g., series resistance placeholder: R = X Ω) to limit bus-fight current.
  5. Verification hooks: logic analyzer triggers for TA, ownership transitions, and intermittent error counters.
Decision tree for selecting Full, Half, or 3-wire SPI Box diagram decision tree using input constraints such as pin budget, streaming need, and shared bus risk to recommend full-duplex, half-duplex, or 3-wire SDIO. Inputs (constraints) Pin / connector budget tight vs ample Streaming needed? sustained / bursty Shared bus risk many slaves? Validation budget limited / strong Start here Is pin/isolation cost dominant? and ownership can be enforced If streaming is required and direction flips are frequent avoid SDIO where possible If traffic is phased write then read (or reverse) Half-duplex is often a fit Recommend 3-wire (SDIO) only with TA + Hi-Z + tests Recommend Full-duplex lowest ownership risk Recommend Half-duplex phased transfers YES NO Rule of thumb: 3-wire saves pins, but only wins if ownership/TA are enforced and verified across corners.

3-Wire Signaling Model: SDIO Ownership, Tri-State, Turn-Around

A 3-wire (SDIO) bus is safe only when ownership is explicit: in each phase, exactly one side may actively drive SDIO, and transitions must include a turn-around (TA) interval where SDIO is Hi-Z. The practical goal is to make “who drives SDIO, when” unambiguous, measurable, and enforceable.

Ownership contract (phase-by-phase)
Phase SDIO Driver Required condition Typical failure if violated
CMD Master Slave output must be disabled Contention, corrupt command
ADDR Usually Master Follow device phase definition Wrong target, wrong direction
TA (turn-around) Hi-Z (both) TA ≥ X ns (placeholder) Intermittent bit errors, heating
DATA (Write) Master Slave must remain disabled Write corruption or bus fight
DATA (Read) Slave Master must be input/Hi-Z 0xFF/0x00 reads, bit-slip
  • Ownership changes only at phase boundaries (never mid-bit).
  • TA is mandatory whenever ownership changes.
  • One active driver at a time; the other side must guarantee output-disable.
Tri-state handoff SOP (minimum safe sequence)
Master → Slave (enter READ)
  1. Disable master output (GPIO→input or OE=0).
  2. Wait tDIS(M) (placeholder: X ns or X cycles).
  3. Allow line to settle (placeholder: tLINE_settle = X ns).
  4. Enable slave output and begin sampling in the defined window.
Slave → Master (return to WRITE / next transaction)
  1. Disable slave output (device or OE=0).
  2. Wait tDIS(S) (placeholder: X ns).
  3. Allow line to settle (same settle budget class as above).
  4. Enable master output only after Hi-Z is confirmed by timing.

Direction handoff is defined as a timing contract. Signal-integrity phenomena are folded into tLINE_settle and handled on the dedicated SI subpage.

Direction control implementation patterns
MCU pin-mux (GPIO mode switching)
  • Mechanism: output ↔ input transitions at phase boundaries.
  • Critical parameter: mux/config latency (folded into tDIS/tEN).
  • Verification hook: confirm SDIO is Hi-Z during TA using timing + logic analyzer.
External OE / tri-state buffer
  • Mechanism: OE gates which side can drive SDIO.
  • Critical parameter: buffer disable/enable delays (tPZ/tPLZ).
  • Verification hook: ensure OE changes only inside TA.
Analog switch (bidirectional)
  • Mechanism: connect/disconnect SDIO path to prevent overlap driving.
  • Critical parameter: enable/disable timing + on-resistance effects (kept at ownership level here).
  • Verification hook: confirm stable logic levels before sampling window.
Hidden traps (3-wire specific)
  • Reads stuck at 0xFF / 0x00: master did not reach input/Hi-Z before slave drives.
  • Intermittent bit errors at higher SCLK: TA margin collapsed (tDIS + settle + tSU not covered).
  • First transaction fails after reset: unsafe power-up default (SDIO still output-enabled).
  • Device heating or unexpected EMI: brief contention inside TA caused overlap driving.
  • Random glitches in Hi-Z window: floating SDIO without a weak bias (define idle level cautiously).
  • Contention only on some boards: timing variation in mux latency / buffer tPZ/tPLZ across lots and corners.
SDIO ownership timing: CMD / ADDR / TA / DATA Timeline diagram showing SDIO being driven by master during CMD/ADDR, Hi-Z during TA, and driven by slave during READ data, with tDIS, tEN, and sampling window marked. Figure 3 · Direction handoff timing (3-wire SDIO) CMD ADDR TA (Hi-Z) DATA (READ) Master drives Slave drives SDIO state ACTIVE tDIS(M) ACTIVE tEN(S) DRIVEN Hi-Z DRIVEN Sample window Rule: Ownership changes only at boundaries; TA must cover tDIS + settle + tEN before sampling. During TA, both sides must be Hi-Z (no active drive).

Timing Budget: Turn-Around Margin & Sampling Windows

In 3-wire SPI, the usable high-speed limit is often set by turn-around budget, not by the nominal SCLK frequency. A safe handoff requires TA to cover driver release, line settling, and receiver setup before the sampling window opens.

Core budget (concept-level)
TTA ≥ tDIS(driver_off) + tLINE_settle + tSU(receiver)

Where tDIS includes MCU mux latency and/or buffer tri-state delay, tLINE_settle is the observable time until SDIO becomes stable, and tSU is the receiver setup requirement before sampling.

Budget contributors (what to account for)
  • MCU IO switching delay: output-disable and input-enable may take multiple cycles (platform-dependent).
  • Tri-state buffer delays: tPZ/tPLZ (disable/enable) add deterministic overhead.
  • Bias recovery: weak pull-up/down (if used) needs time to restore a defined level during Hi-Z.
  • Input threshold behavior: Schmitt vs CMOS threshold changes what “stable enough” means for sampling.
  • Sampling window placement: the receiver must sample only after stability + setup are satisfied (mode specifics are handled elsewhere).
Timing budget table (fill with datasheet + measurement)
Term Represents Where to get it Placeholder If underestimated
tDIS(M) Master output disable → true Hi-Z MCU datasheet + scope/LA X ns Contention in TA, read corruption
tPZ/tPLZ Tri-state buffer disable/enable delay Buffer datasheet timing X ns TA consumed, margin collapses
tLINE_settle Time until SDIO becomes stable enough Scope measure on SDIO X ns Edge not settled at sampling
tSU(RX) Receiver setup before sampling window Device timing spec X ns Sampling too early, bit errors
Margin Remaining TA after all contributors Computed from filled values X ns Intermittent failures across corners
Turn-around budget stack: what consumes TA margin Stacked block diagram visualizing TA budget consumption by tDIS, buffer delays, line settling, and receiver setup, leaving remaining margin. Figure 4 · TA margin stack (concept-level) Available TTA (placeholder) tDIS tPZ/tPLZ tLINE_settle tSU Margin How to use this stack: 1) Fill the table with datasheet + measured values. 2) If Margin ≈ 0, expect intermittent errors across voltage/temperature/lot. 3) Improve margin by increasing TA cycles, reducing tDIS/tPZ, or lowering settle time. Key point: The 3-wire ceiling is often the TA + line recovery budget, not SCLK alone. Signal-integrity root causes are abstracted into tLINE_settle and handled on the SI subpage.

Hardware Patterns: MCU/FPGA Pin Tricks, OE Buffers, Analog Switches

Stable 3-wire (SDIO) hardware is built around one rule: mutual-exclusion on SDIO driving. The patterns below provide repeatable reference architectures without expanding into long-trace termination details (handled on the SI subpage).

Quick selection summary (3 patterns)
Pattern Mutual-exclusion strength TA overhead driver Typical risk Best fit
MCU/FPGA direct (pin-mux) Software-enforced IO config latency Missed input/Hi-Z → contention Lowest BOM, short traces
OE tri-state buffer Hardware-gated tPZ/tPLZ + OE timing OE not aligned to TA Higher SCLK, robust bring-up
Analog switch Path-gated Enable/disable + settle Ron/Cpar affects settle Contention-sensitive systems

Long-trace termination and detailed SI are handled on the Long-Trace SI subpage; this section focuses on ownership enforcement and contention control.

Pattern 1 — MCU/FPGA direct (pin-mux SDIO)
  • Mechanism: the same SDIO pin switches output ↔ input at phase boundaries.
  • Key constraint: configuration writes are not instantaneous; the effective delay contributes to tDIS/tEN.
  • Must-have: a safe default state (reset/power-up SDIO = input/Hi-Z) before any transaction.
  • Verification hook: confirm Hi-Z during TA with timing + logic analyzer, then validate read data stability at the sampling window.
Pattern 2 — OE tri-state buffer (hard mutual-exclusion)
  • Mechanism: OE gates which side is allowed to drive SDIO (ownership becomes hardware-enforced).
  • Key constraint: buffer disable/enable timing (tPZ/tPLZ) consumes TA and must be budgeted.
  • Control rule: OE transitions must occur only inside TA (no mid-data switching).
  • Verification hook: monitor OE vs SDIO to ensure zero overlap driving across process/voltage/temperature corners.
Pattern 3 — Analog switch (path-gated SDIO)
  • Mechanism: connect/disconnect SDIO path to prevent simultaneous strong driving.
  • Key constraint: on-resistance and parasitics (Ron/Cpar) may increase settle time (modeled as tLINE_settle here).
  • Control rule: switch state changes only in TA; allow stability before sampling.
  • Verification hook: verify logic levels remain valid across temperature and supply variation during read windows.
Contention protection ladder (hardware-facing)
  • Must: safe power-up default (SDIO input/Hi-Z) + explicit TA cycles.
  • Recommended: series-R current limiting (X–Y Ω placeholder) and a weak bias if SDIO floats during Hi-Z.
  • Optional: short-tolerant drivers / thermal protection / current sensing (system-dependent).
Three reference hardware patterns for 3-wire SDIO Three-column block diagram comparing MCU direct SDIO, OE tri-state buffer gating, and analog switch path gating, each with short pros, risks, and best-fit tags. Figure 5 · Hardware reference patterns (3-wire SDIO) MCU direct OE buffer Analog switch Master Slave SDIO Pin-mux (IN/OUT) Pro: lowest BOM Risk: mux latency Fit: short trace Master Slave OE SDIO gated Pro: hard mutual-excl Risk: tPZ/tPLZ Fit: higher SCLK Master Slave SW (EN) SDIO Pro: no hard fight Risk: Ron/Cpar Fit: contention sensitive Note: All patterns require explicit TA and a safe power-up default (SDIO input/Hi-Z). Detailed termination/trace-length rules are handled on the SI subpage.

Contention & Line Conditioning: How to Avoid Bus Fight in 3-Wire

Contention (“bus fight”) happens when both sides drive SDIO with opposing values. It is a common field failure because it can be intermittent, temperature-sensitive, and highly dependent on timing corners. The strategy is to recognize contention symptoms early, confirm with fast checks, and apply layered mitigations.

Contention fingerprints (symptoms)
  • Stuck reads (0xFF / 0x00): SDIO never truly released before the slave drives.
  • Intermittent CRC/bit errors: short overlap driving inside TA causes sporadic corruption.
  • Unexpected heating: repeated high-current overlap events during direction changes.
  • EMI anomalies: contention creates sharp current transients and supply/ground noise.
Root-cause taxonomy (what typically causes overlap drive)
  • Timing too early/late: TA does not cover tDIS + settle + tSU.
  • IO configuration error: SDIO remains output-enabled when it must be input/Hi-Z.
  • OE sequencing mismatch: OE toggles outside TA or multiple modules fight over OE control.
  • Unsafe defaults: power-up/reset states allow both sides to drive before the first transaction.
Troubleshooting cards (Fault → Quick check → Fix)
Fault: master never truly releases SDIO
Quick check: confirm SDIO is input/Hi-Z for the full TA duration (timing + LA).
Fix: enforce “disable output → wait tDIS → enable slave drive,” and make SDIO input/Hi-Z the reset default.
Fault: slave drives too early
Quick check: measure tEN(S) and ensure sampling window starts after stable drive.
Fix: extend TA cycles or delay the slave-enable event; keep all enable/disable actions inside TA.
Fault: OE toggles out of order
Quick check: correlate OE edges to TA boundaries (OE must not change in CMD/ADDR/DATA).
Fix: make a single ownership state machine the only producer of OE transitions.
Fault: overlap events cause heating/EMI spikes
Quick check: inspect supply/ground noise and temperature rise during direction changes.
Fix: add series-R (X–Y Ω placeholder) for current limiting and verify TA margin under corners.
Mitigation ladder (Must → Recommended → Optional)
  • Must: safe default (SDIO input/Hi-Z) + explicit TA cycles + ownership transitions only at phase boundaries.
  • Recommended: series-R current limiting (X–Y Ω), weak bias if SDIO floats, single OE controller.
  • Optional: contention detection via current/temperature/error counters and event logging for field diagnostics.
Contention (bus fight) current path and mitigation points Block diagram showing master and slave driving SDIO to opposite levels simultaneously, with current path arrows and mitigation points for series resistor and OE gating. Figure 6 · Contention example (bus fight) + mitigation points Master Drive HIGH Slave Drive LOW SDIO BUS FIGHT High current R Series-R OE Gating Mitigation points shown: • Series-R limits contention current and reduces damage/EMI spikes. • OE gating enforces one-driver-at-a-time (enable/disable only inside TA). • Safe defaults + explicit TA are required to prevent overlap at reset/power-up. • SI specifics are abstracted into “settle time” and covered on the SI subpage.

Firmware State Machine: Direction Control, Timeouts, Recovery

A robust 3-wire (SDIO) implementation treats direction changes as a first-class state transition. Every wait has a timeout, every failure has a bounded retry policy, and recovery always returns SDIO to a safe known state (input/Hi-Z) before restarting.

Recommended layering (portable design)
  • Transaction layer: CMD/ADDR/DATA sequencing and protocol framing.
  • Ownership/IO layer: pin-mux / OE / switch control; enforces “one driver at a time.”
  • Contract between layers: explicit requests (MASTER_DRIVE / SLAVE_DRIVE / Hi-Z(TA)) with timeout-based acknowledgements.

CPOL/CPHA and detailed sampling-edge rules remain on the SPI mode subpage; this section focuses on ownership transitions, timeouts, and recovery.

State machine template (copyable structure)
  • IDLE: SDIO = input/Hi-Z; CS deasserted; clear transaction context.
  • CMD / ADDR: request MASTER_DRIVE; transmit command/address; validate framing.
  • TA_ENTER: gate/hold SCLK; request Hi-Z(TA); wait for tDIS + settle.
  • RX/TX: request SLAVE_DRIVE for reads or MASTER_DRIVE for writes; apply optional dummy/discard rules.
  • END: deassert CS; force SDIO input/Hi-Z; record stats; return to IDLE.
  • ERROR → RECOVERY: bounded retries; then recovery ladder; always exit with SDIO input/Hi-Z.
Mandatory direction-change actions (robustness anchors)
  • Before switching: stop/gate SCLK (or keep quiet), then enter TA and disable the current driver.
  • During TA: wait tDIS(driver_off) + tLINE_settle before enabling the new driver.
  • After switching: support optional dummy cycles or discard-first-bit/byte if the target requires alignment.
  • At any failure: force SDIO to input/Hi-Z first; then apply recovery steps.
Timeout & retry parameter table (placeholders)
Parameter Purpose Where it comes from Placeholder If too small If too large
T_OWNERSHIP_TIMEOUT Max time to complete pin-mux / OE / switch transition MCU/FPGA timing + buffer tPZ/tPLZ + measurement X us False timeouts, excessive retries Slow recovery from real faults
T_DATA_VALID_TIMEOUT Max time to wait for stable read window tEN + settle budget + system margin X us Intermittent read corruption Long stalls on missing device
T_TRANSACTION_TIMEOUT Upper bound for a full transaction (frame) System watchdog policy + expected payload X ms Premature abort under load Slow failure detection
RETRY_LIMIT Maximum retries before recovery System reliability policy N Recovery entered too often Wastes time on unrecoverable faults
DUMMY_CYCLES / DISCARD_FIRST Alignment after direction switch (device-defined) Device timing/protocol requirements X Bit/byte misalignment Throughput loss

Detailed DMA throughput tuning is handled on the DMA subpage; this table focuses on robustness parameters that prevent hangs and silent corruption.

Recovery ladder (always exit with SDIO input/Hi-Z)
  1. Level 0 (soft exit): deassert CS → SDIO input/Hi-Z → clear context → restart.
  2. Level 1 (device soft reset): issue device reset command/register write (device-defined) → wait X ms.
  3. Level 2 (CS pulse sequence): toggle CS X times with a guard delay to exit stuck internal states.
  4. Level 3 (bus release): force SDIO input/Hi-Z for X us; re-enter IDLE; retry with safe TA.
  5. Level 4 (system reset): last resort; use watchdog/power-cycle policy.
3-wire SPI firmware state machine with recovery Block diagram showing transaction states IDLE, CMD/ADDR, TA, RX/TX, END, and error-to-recovery path, plus an IO ownership sub-state machine for driver enable/disable. Figure 7 · Firmware state machine (robust 3-wire SDIO) IDLE CMD ADDR TA RX TX END ERROR RECOVERY SDIO → Hi-Z Retry ≤ N Return to safe IDLE IO/Ownership sub-FSM (executed inside TA) OFF WAIT ON tDIS + settle

Multi-Slave & Shared SDIO: Collision Rules and CS Discipline

Shared SDIO becomes fragile when more than one slave can drive the same wire. The safety condition is strict: only one slave may ever obtain drive permission at a time, and CS transitions must not create transient overlap. CS fanout trees and daisy-chains are handled on the Chip-Select & Fanout subpage; this section defines the discipline and failure patterns.

Discipline checklist (non-negotiable rules)
  • One active CS: at most one CS asserted for any SDIO transaction.
  • Hi-Z when not selected: each slave must guarantee SDIO output is tri-stated when CS is inactive.
  • Safe power-up defaults: all CS lines default to “not selected” (defined pull state).
  • Guard time: enforce TA_GUARD = X cycles around CS changes and direction changes.
  • Single owner controller: one state machine controls CS + ownership transitions (no competing writers).
  • Recovery order: deassert CS first, then force SDIO input/Hi-Z before attempting retries.
Typical incident postmortems (what often goes wrong)
Incident: two slaves drive SDIO simultaneously
Trigger: CS decode glitch or undefined CS state during reset.
Evidence: stuck reads, sporadic CRC errors, heating, or EMI spikes clustered around CS edges.
Fix: define CS default pulls, add CS deglitch/guard time, and enforce a single CS owner.
Incident: bus works on bench, fails after power-cycle
Trigger: at least one slave does not guarantee Hi-Z when not selected during early boot.
Evidence: first transaction fails; subsequent ones sometimes recover after retries.
Fix: enforce “CS high + SDIO input/Hi-Z” before the first command; add recovery Level 0 as a startup step.
Minimal recommendations (improves robustness without changing topology)
  • CS guard time: add a guard delay around CS edges (X us placeholder) to avoid overlap selection.
  • Defined CS defaults: ensure power-up CS = not selected via pull states; avoid floating CS.
  • Enforced TA_GUARD: treat TA as a mandatory protection period for both direction change and CS switching.
  • Centralized control: one state machine owns CS + ownership decisions; prevent competing firmware writers.
Shared SDIO with multiple chip-select lines and mutual exclusion Block diagram showing a master connected to multiple slaves over a shared SDIO line, each controlled by its own CS, with tri-state drivers and a rule that only one CS may be active at a time. Figure 8 · Shared SDIO + multi-CS mutual-exclusion discipline Master SDIO (shared) Slave A Slave B Slave C Hi-Z Drive EN Hi-Z Drive EN Hi-Z Drive EN CS_A CS_B CS_C Rule: Only one CS active → only one slave may enable SDIO drive. Add TA_GUARD around CS edges (X cycles) to prevent overlap selection. Power-up: all CS default NOT selected; recovery: deassert CS then force SDIO Hi-Z.

H2-9 · Power-Up, Brown-Out, Hot-Plug: Preventing Accidental Select and Ghost Power

Risk checklist (real-world failure mechanisms)

  • Power-up tri-state: MCU pins may start as Hi-Z. If CS floats, narrow pulses or unintended levels can accidentally select sensitive devices (flash/config/PMIC-like targets).
  • Brown-out split reset: some devices reset while others remain partially alive. Bus state machines become out-of-sync, and legal-looking fragments can occur during recovery.
  • Hot-plug transients: connect order and ground bounce can create CS glitches or partial frames before the system is stable.
  • Ghost powering: IO injection through CS/MOSI/MISO can partially power a device into a half-awake state, causing non-Hi-Z behavior or unexpected bus loading.

Fast observable signs: first-transaction failures after reset, “impossible” IDs, CS pulses captured during power ramp, or a supposedly unpowered module still influencing MISO level.

Hardware mitigations (default-safe first)

1) Bias CS to a safe inactive level

  • Use pull-up/pull-down bias so CS does not float during MCU Hi-Z windows.
  • Verify the inactive polarity per slave; keep the entire tree aligned with “all inactive” as the default state.

2) Add a global enable gate (SAFE/EN)

  • Treat EN as the real “CS master gate” for decode/buffer trees.
  • Make EN default OFF with passive bias, then only release it after power-good and reset are stable.

3) Control hot-plug and brown-out entry/exit

  • Hold all CS inactive during attach/detach windows; do not allow partial frames while rails settle.
  • If modules can be unpowered while signals remain present, consider bus switches or isolation switches to physically disconnect CS/MISO paths.

4) Block ghost power paths (IO injection)

  • Ensure unpowered modules do not receive active CS/MOSI that can back-feed via protection structures.
  • Prefer designs where ground/power are established before signal eligibility is granted (via SAFE/EN gate).

Pass criteria (placeholders): during power-up/brown-out/hot-plug tests, CS-active events = 0 before SAFE/EN is released; no unintended writes/side effects; no “half-awake” device drives MISO while unselected.

Firmware mitigations (boot order + recovery sequences)

  1. Boot priority: configure all CS pins as explicit inactive outputs as early as possible; keep SAFE/EN asserted OFF until ready.
  2. Pre-transaction gate: only start SPI frames after system power-good/reset are stable and the bus is in an all-inactive idle.
  3. Brown-out handling: on detection, enter a deterministic bus reset sequence (disable engine → all CS inactive → re-init → re-enable SAFE/EN).
  4. Sensitive targets: require explicit “unlock then write” flows (or hardware write-protect usage) so accidental selects cannot cause persistent damage.

Quick check: if “first transaction after reset” fails but subsequent attempts pass, treat it as a strong indicator of unstable default states or split-reset sequencing. Validate SAFE/EN behavior and CS biasing before tuning timing.

Diagram · Power-up Hi-Z can float CS unless SAFE/EN gates selection

Power-up tri-state causes CS floating and accidental select MCU pins start high impedance at boot. Without biasing and a safe enable gate, chip-select lines can float and accidentally select sensitive devices. SAFE/EN defaults off and is released only after power-good and reset are stable. MCU GPIO Hi-Z PWR_GOOD RESET_OK SAFE / EN default OFF CS FLOAT / GLITCH Bias pull-up/down Decoder Slave A Slave B Sensitive device Goal: all CS inactive until PWR_GOOD + RESET_OK SAFE/EN defaults OFF; CS bias prevents floating No accidental select during ramps/hot-plug/brown-out

H2-10 · Bring-Up & Debug: Analyzer Triggers, Signature Patterns, and Fast Isolation

The 3-step isolation method (fast, repeatable)

Step 1 — Narrow the scope

  • Capture traffic per-CS and correlate failures with a specific CS line or transaction type.
  • Trigger on CS edges and count transactions to identify “only fails on CSx” vs “system-wide” issues.
  • Add a short-pulse/glitch trigger to detect accidental selects.

Step 2 — Validate signatures (“who is talking”)

  • Read a stable identity/version register as a signature (method, not vendor-specific values).
  • If multiple CS lines return the same signature, suspect decode/mapping or selection leakage.
  • If a single CS returns random data, suspect contention or timing-window collapse.

Step 3 — Prove the root cause with minimal changes

  • Contention: force only one CS enabled; optionally add/enable a MISO mux and retest.
  • Glitch: close SAFE/EN, stabilize address lines, then open the gate; confirm glitch events disappear.
  • Timing: increase turnaround gaps, reduce SCLK, or add inter-frame delay; watch for trend improvement.
  • Wrong select: build a CS→signature mapping list; any mismatch is a wiring/decoder mapping fault.

Pass criteria (placeholders): no CS glitch events; per-CS signature is stable across N reads; no duplicate signature across different CS lines unless intentionally shared; contention indicators disappear when other CS are forced inactive.

Analyzer trigger templates (CS-focused)

  • CS edge + protocol decode: run per-CS decode sessions and compare transaction counts and error ratios.
  • Glitch capture: trigger on pulses shorter than a defined width (or use a “runt pulse” detector if available).
  • Frame boundary break: trigger when CS toggles during an active transfer or mid-byte.
  • Turnaround window audit: measure time between CS deassert and next CS assert; compare to the required safe window budget.

Signature patterns → likely cause (fast interpretation)

Same signature under different CS

Likely decode mapping fault, enable-gate misuse, or selection leakage. Verify SAFE/EN gating and CS routing mapping.

Random data on one CS, stable on others

Suspect MISO contention or insufficient timing margin for that branch. Force single-slave mode and/or add MISO gating to prove it.

First transaction fails after reset, then passes

Treat as unstable default state or split-reset sequencing. Re-verify “all CS inactive” before SAFE/EN release, and check ghost-power behavior.

Errors correlate with CS switching only

Suspect turnaround budget not met, CS overlap, or decoder glitch. Audit CS-to-CS gaps and glitch events.

Diagram · Debug flow: symptom → checks → fix path (contention / glitch / timing / wrong select)

SPI bring-up debug flow for chip-select and fanout issues A flowchart to diagnose chip-select and fanout failures: capture CS behavior, validate device signatures, then branch to contention, glitch, timing, or wrong-select fixes. Symptom ID mismatch / random reads first-transaction fail Checks (logic analyzer) CS glitch? CS overlap? signature consistent per CS? Signature step read stable ID/version map CS → device Contention force 1 CS MISO mux Glitch close SAFE/EN stabilize addr Timing add gap reduce SCLK Wrong select CS mapping signature list Goal: prove the root cause with minimal changes, then harden CS fanout rules

Engineering Checklist (Design → Bring-Up → Production)

Acceptance is based on objective evidence: CS/SCLK/SDIO waveforms (LA/scope), bounded timeouts & recovery (firmware), and repeatable statistics (logs). This checklist stays focused on 3-wire ownership, TA margins, contention safety, and field robustness.

Design checklist (reviewable on schematic + firmware interface)
  • Ownership contract is explicit: which phase drives SDIO (CMD/ADDR/DATA) and when TA is inserted.
  • TA guard is defined: TA_GUARD = X cycles (placeholder) and includes disable/enable + line settle + receiver setup.
  • Safe default states: at power-up/reset SDIO is forced to input/Hi-Z; all CS lines default to not-selected.
  • Contention energy is limited: series-R (X–Y Ω placeholder) and/or OE gating isolates drivers during TA.
  • Dummy/discard hooks exist: configurable dummy cycles and/or discard-first-bit/byte after handoff.
  • Recovery ladder exists: L0/L1/L2 recovery steps; all exits end with CS deasserted and SDIO Hi-Z.
  • Logging fields are reserved: txn_id, phase_fail, error_code, retries, duration_us, own_grant_us, recovery_level.
  • Multi-slave discipline is enforceable: exactly one active CS at a time; CS guard time around switching.
  • Probe points are planned: access to CS/SCLK/SDIO (and optional OE/DIR) for bring-up and production.
Concrete parts (common design building blocks)
  • OE tri-state buffer (SDIO isolation): TI SN74LVC1G125 / SN74LVC1G126 (family), onsemi NC7WZ125 (family), Nexperia 74LVC1G125 (family) — verify suffix/package.
  • Bus switch w/ OE (low Ron, contention-friendly): TI SN74CB3T1G125, Nexperia 74CBT1G125 (family) — verify Ioff/enable behavior per suffix.
  • Direction-controlled level translator (DIR + OE for SDIO): TI SN74AXC1T45 (1-bit), TI SN74AXC2T45 (2-bit), TI SN74LVC1T45 (family) — verify DIR/OE truth table.
  • Analog SPDT switch (ownership gating / mux): TI TS5A23157, Analog Devices ADG772, onsemi NC7SB3157verify Ron/bandwidth/leakage for SDIO edges.
  • Low-cap ESD protection (at connector/edge): TI TPD1E10B06 (1-ch), TI TPD2E007 (2-ch), Nexperia PESD5V0S1ULcheck Cdiff/Cline vs timing margin.
  • Series-R / bias resistors (examples): 22 Ω 0402: Yageo RC0402FR-0722RL, Panasonic ERJ-2RKF22R0X, Vishay CRCW040222R0FKED · 100 kΩ 0402 (weak bias): Yageo RC0402FR-07100KL, Vishay CRCW0402100KFKEDverify value/power/tolerance.
Design · Pass criteria (placeholder thresholds)
Likely cause: TA not budgeted, unsafe boot defaults, no bounded recovery.
Quick check: schematic + firmware interface review confirms TA_GUARD, Hi-Z defaults, one-owner rule.
Fix: add OE/switch + series-R, enforce CS not-selected defaults, add dummy/discard + recovery ladder.
Pass criteria: TA_GUARD defined (X cycles); boot defaults force SDIO input/Hi-Z; recovery exits with CS deassert + SDIO Hi-Z.
Bring-up checklist (evidence-based validation)
  • Capture the minimum set: CS, SCLK, SDIO (plus optional OE/DIR).
  • TA Hi-Z proof: SDIO has no drive activity inside TA; trigger on CS edge + TA window.
  • Handoff glitch proof: no short spikes/pulses on SDIO at TA enter/exit.
  • First-byte stability: verify whether dummy cycles / discard-first is required; confirm with first-byte anomaly trigger.
  • Fault injection A (direction stuck): intentionally prevent direction switch; verify bounded timeout and recovery (no deadlock).
  • Fault injection B (reduce TA): reduce TA_GUARD; confirm errors increase in the expected window (proves sensitivity and tooling).
  • Boundary sweep: sweep SCLK from low to high; record first-fail frequency and failure phase (CMD/TA/RX/TX).
  • Recovery ladder exercise: verify L0/L1/L2 recovery returns to IDLE (CS deasserted, SDIO Hi-Z) within X ms (placeholder).
Bring-up · Pass criteria (placeholder thresholds)
Likely cause: overlap during handoff or missing dummy/discard rules.
Quick check: LA proof that SDIO is Hi-Z in TA; scope confirms no handoff spikes; logs confirm bounded retries/timeouts.
Fix: increase TA_GUARD (X cycles), align dummy/discard policy, correct OE/DIR timing, enforce CS guard time.
Pass criteria: TA Hi-Z holds for all tested SCLK ≤ X; first-byte error rate ≤ X ppm; recovery returns to IDLE ≤ X ms.
Production checklist (repeatability + measurable thresholds)
  • Corner coverage: validate across temperature/voltage corners; record phase_fail distribution.
  • Lot-to-lot consistency: compare boundary sweep results and retry/timeout rates between lots.
  • Production test mode: fixed pattern write/read (or read-only) that exercises TA and first-byte regions.
  • Minimum logging retained: txn_id, phase_fail, error_code, retries, duration_us, recovery_level.
  • Thresholds (placeholders): retry rate ≤ X ppm; timeout rate ≤ X ppm; transaction duration P99 ≤ X us.
  • Failure triage: define an action when thresholds are exceeded (retest/repair/derate mode), without allowing indefinite stalls.
Production · Pass criteria (placeholder thresholds)
Likely cause: marginal TA margin under corners or inconsistent default states across variants.
Quick check: compare corner logs (phase_fail + retries) and confirm TA Hi-Z still holds at test conditions.
Fix: increase TA_GUARD (X), enforce stricter CS guard, adjust dummy/discard policy, or switch to OE-buffer topology.
Pass criteria: corner error rates ≤ X ppm; boundary sweep ≥ X; recovery never exceeds X ms; logs are complete and traceable.
Bring-up flow for 3-wire SPI validation A step-by-step bring-up flow from wiring and defaults to waveform capture, TA Hi-Z check, first byte check, fault injection, and acceptance report. Figure 11 · Bring-up flow (wire → waveforms → fault injection → acceptance) Wiring + defaults CS idle · SDIO Hi-Z Capture signals CS · SCLK · SDIO Verify TA Hi-Z No drive in TA First byte check Dummy · Discard Fault injection Stuck DIR · Short TA Acceptance report X ppm · X ms Evidence • LA: TA Hi-Z proof • Logs: retries/phase_fail Stress • Sweep SCLK • Inject stuck DIR Accept • ≤ X ppm • ≤ X ms

Applications & IC Selection Notes (Only 3-Wire-Relevant)

Selection here is intentionally narrow: only attributes that directly affect SDIO ownership, tri-state timing (tDIS/tEN), contention tolerance, and reset/default Hi-Z behavior. General SPI throughput topics and CS fanout topology belong to other subpages.

Common 3-wire SDIO usage contexts (examples)
  • Sensors and mixed-signal peripherals that expose a single SDIO pin to save package pins (direction and dummy rules vary by vendor).
  • Tightly pin-limited modules where a single isolation channel or single connector pin is preferred.
  • Multi-drop boards where contention safety and reset defaults dominate overall reliability more than raw SCLK.
Selection checklist (Yes/No + notes) — with concrete part examples
Dimension Yes/No What to verify (3-wire-specific) Concrete examples (material numbers)
Explicit SDIO / 3-wire support Yes / No Datasheet must define when the slave drives SDIO and when it is Hi-Z. If not explicit, shared SDIO is high risk. Use external ownership hardware if ambiguous: TI SN74LVC1G125, TI SN74CB3T1G125, TI SN74AXC1T45
Dummy cycles / discard-first required Yes / No Check if the first bit/byte after ownership changes is defined; confirm X dummy cycles and whether discard-first is needed. Firmware hook + trigger tooling (no extra IC required). If adding gating: TI TS5A23157 / ADI ADG772 (clean handoff path)
Tri-state timing (tDIS / tEN) available Yes / No If peripheral does not specify tri-state timing, the system must budget TA conservatively (X cycles). If using OE buffers/switches, include their disable/enable timing too. OE buffer: TI SN74LVC1G125 · Bus switch: TI SN74CB3T1G125 · Translator: TI SN74AXC1T45
Reset/default state is Hi-Z safe Yes / No Confirm SDIO is not actively driven during reset and while CS is inactive. If uncertain, enforce SDIO Hi-Z with external OE gating. OE gating: TI SN74LVC1G125 · Weak bias: Yageo RC0402FR-07100KL
Contention tolerance / protection strategy Yes / No Provide at least one layer that limits fight energy: TA discipline (must), plus series-R and/or OE isolation (recommended). Add low-cap ESD at exposed ports. Series-R: Yageo RC0402FR-0722RL · ESD: TI TPD2E007, Nexperia PESD5V0S1UL
Isolation channel count (if required) Optional 3-wire can reduce isolator channel count, but propagation delay and default-state behavior must still preserve TA and Hi-Z. TI ISO7741 (4-ch), Analog Devices ADuM140E (4-ch) — verify default output states.
Note: part numbers above are examples for building ownership/TA robustness. Always verify suffix, package, voltage rating, timing, and availability against the current datasheet and BOM rules.
Red flags (high risk for shared SDIO)
  • No explicit statement of when the slave drives SDIO vs Hi-Z (ownership contract is ambiguous).
  • CS inactive behavior is not guaranteed to be Hi-Z (multi-slave SDIO becomes unsafe).
  • No tri-state timing guidance (tDIS/tEN absent) and system refuses to budget TA conservatively.
  • Reset/power-up defaults allow active drive (first transaction fails or contention occurs at boot).
3-wire selection checklist diagram Icon-style checklist diagram for 3-wire SPI selection: SDIO+TA, tri-state timing, contention tolerance, and reset Hi-Z behavior, leading to a pass decision. Figure 12 · 3-wire selection checklist (only the critical items) Candidate IC SDIO interface SDIO + TA rules tDIS / tEN known Contention tolerance Reset Hi-Z safe Pass All critical checks = Yes Example building blocks OE buffer: SN74LVC1G125 · Bus switch: SN74CB3T1G125 Translator: SN74AXC1T45 · Switch: TS5A23157 / ADG772 ESD: TPD2E007 / PESD5V0S1UL · 22Ω: RC0402FR-0722RL

Request a Quote

Accepted Formats

pdf, csv, xls, xlsx, zip

Attachment

Drag & drop files here or use the button below.

FAQs (3-Wire SPI)

Each answer uses a fixed, measurable structure: Likely cause / Quick check / Fix / Pass criteria (threshold placeholders: X cycles / X ns / X ppm / X ms).

3-wire reads are always 0xFF / 0x00 — direction not switched or TA too short?
Likely cause: Master still drives SDIO during the read phase, or SDIO never truly enters Hi-Z inside TA.
Quick check: Capture CS/SCLK/SDIO and verify SDIO is Hi-Z for ≥ X ns during TA; force SDIO input before sampling and add TA_GUARD=X cycles.
Fix: Insert/extend TA_GUARD, enforce “master disable → settle → slave enable” ordering, and add discard-first-byte or dummy cycles if the peripheral requires it.
Pass criteria: TA Hi-Z holds (≥ X ns) and readback mismatch rate ≤ X ppm over X transactions at SCLK ≤ X MHz.
Low speed is stable, high speed has rare errors — check tDIS/tEN first or dummy cycles first?
Likely cause: Turn-around margin collapses at high SCLK due to disable/enable latency, or first-byte needs dummy/discard.
Quick check: Run two A/B tests: (A) add dummy=X cycles or discard-first-byte; (B) double TA_GUARD (X→2X). If errors track TA, it is margin; if they track dummy, it is phase/first-byte behavior.
Fix: Budget TA with worst-case disable/enable + settle, then lock a conservative TA_GUARD; implement configurable dummy/discard hooks per device profile.
Pass criteria: At target SCLK ≤ X MHz, error rate ≤ X ppm; changing TA_GUARD by +X cycles changes error rate by ≤ X% (stable margin).
The slave sometimes runs hot — how to confirm bus fight fastest?
Likely cause: SDIO contention (both ends drive opposite levels) during handoff or due to unsafe defaults after reset.
Quick check: Measure supply current/temperature while capturing SDIO around TA; look for correlated spikes and SDIO “stuck-high/low” or short glitches at TA boundaries.
Fix: Enforce Hi-Z inside TA, add series-R=X Ω to limit fight current, and/or isolate SDIO with OE buffer/bus switch controlled by a single state machine.
Pass criteria: Additional current during worst-case injection ≤ X mA, no sustained contention > X ns, and thermal rise ≤ X °C over X min.
First transaction after power-up always fails, then works — defaults or first-read dummy?
Likely cause: SDIO/CS default states are unsafe at boot, or the device needs a warm-up/dummy/discard for the first read after reset.
Quick check: Trigger capture on the first transaction after reset deassert; verify CS is not-selected by default and SDIO is Hi-Z before the transaction. Add an explicit “first-read dummy=X” and compare.
Fix: Force SDIO input/Hi-Z during reset, add CS pull-ups/deglitch if needed, and implement a deterministic first-transaction sequence (delay X ms + dummy/discard policy).
Pass criteria: First-transaction pass rate ≥ (1 − X ppm) across X power cycles; reset-to-first-transaction delay ≥ X ms is documented and enforced.
Two slaves occasionally respond at the same time — CS bounce or decode glitch?
Likely cause: CS overlap/glitch causes two slaves to drive SDIO simultaneously, especially during switching between slaves.
Quick check: Capture CS1/CS2 (or decoder outputs) with SDIO; verify “active CS count” is always 1 and overlap time is 0. Add CS guard time = X cycles and see if failures disappear.
Fix: Debounce/deglitch CS, ensure power-up defaults keep all CS deasserted, and enforce a guard interval before enabling SDIO ownership for the newly selected slave.
Pass criteria: CS overlap ≤ X ns (prefer 0), and dual-response incidents ≤ X ppm over X slave-switch events.
Logic analyzer shows short SDIO glitches — GPIO mode switch or OE timing?
Likely cause: Output-enable transitions and pin-mode updates are not aligned, causing brief unintended drive during handoff.
Quick check: If OE/DIR exists, capture OE/DIR alongside SDIO and correlate glitch timing; otherwise capture the handoff edge and add “stop clock + TA_GUARD=X” to see if glitch disappears.
Fix: Sequence control as “disable driver → wait settle → enable other side” and keep OE owned by one state machine; add small series-R=X Ω if needed to reduce fight energy.
Pass criteria: SDIO glitch width ≤ X ns and does not create CRC/misalignment errors (≤ X ppm) at SCLK ≤ X MHz.
Writes work, reads fail — is the ownership switch placed in the wrong phase?
Likely cause: Master does not release SDIO before the slave begins driving, or the read sample window starts before SDIO is valid after handoff.
Quick check: Verify that the “master disable” event occurs before the first read sample by ≥ X ns; add TA_GUARD and optionally discard the first byte to confirm phase alignment.
Fix: Move the ownership switch to the correct boundary (CMD/ADDR end → TA → DATA) and enforce a deterministic TA and first-byte policy per device.
Pass criteria: Read success rate ≥ (1 − X ppm) across X reads; no evidence of dual-drive around handoff in captured waveforms.
Different MCU platforms behave differently — pin-mux latency or edge sampling differences?
Likely cause: Direction/pin-mode changes have different register-to-pad latency; the intended Hi-Z moment differs between platforms.
Quick check: Log and compare own_grant_us (time from “release” request to SDIO actually Hi-Z) and phase_fail distribution; in waveforms, measure handoff delay and jitter on each platform.
Fix: Use a platform-independent TA_GUARD sized for the slowest platform, and drive ownership via OE buffer/bus switch when MCU pad timing is not deterministic.
Pass criteria: own_grant_us P99 ≤ X us and cross-platform delta ≤ X us; error rate ≤ X ppm on all supported MCUs.
After reset the bus is “stuck” — how to force SDIO release and recover?
Likely cause: SDIO remains driven (wrong mode) or a slave is still selected/active due to CS state; recovery is unbounded.
Quick check: Execute L0: deassert all CS, force SDIO input/Hi-Z, wait X us, then retry a known-safe transaction. If still stuck, escalate to L1/L2 with bounded timers.
Fix: Implement a recovery ladder with hard timeouts: L0 bus release → L1 soft reset sequence → L2 re-init and rate-derate; ensure all exits return to IDLE with CS deassert + SDIO Hi-Z.
Pass criteria: Recovery completes within ≤ X ms and subsequent X transactions are error-free (≤ X ppm).
The device likely needs dummy cycles but the documentation is unclear — how to confirm by waveforms/reads?
Likely cause: First valid data appears after a device-specific latency, so sampling starts too early after handoff.
Quick check: Sweep dummy cycles (0/1/2/4/8/…) and plot read mismatch rate vs dummy; capture SDIO to see when the slave begins driving stable data relative to TA end.
Fix: Lock a per-device profile: dummy=X, discard-first-byte=Yes/No, and TA_GUARD=X; keep the policy configurable in firmware.
Pass criteria: Chosen dummy value yields mismatch rate ≤ X ppm across X reads and holds across temperature/voltage corners (same profile).
SDIO behaves oddly in multi-voltage designs — could level shifting create contention during direction changes?
Likely cause: Auto-direction or mismatched DIR/OE timing causes both sides to drive through the level shifter during handoff.
Quick check: Identify whether the translator has explicit DIR+OE control; compare A/B with a same-voltage direct connection (or forced Hi-Z via OE) to see if the anomaly disappears.
Fix: Use DIR/OE-controlled translation for SDIO (no auto-direction for 3-wire ownership), and ensure TA includes translator disable/enable timing; follow the dedicated Level Translation page for domain-level design.
Pass criteria: No dual-drive evidence during handoff; mismatch rate ≤ X ppm at SCLK ≤ X MHz with the final level-translation configuration.
Production failures are rare and hard to reproduce in the lab — what statistics should be logged?
Likely cause: Corner conditions shrink TA margin; without phase-aware stats the failure mode cannot be clustered or verified after fixes.
Quick check: Log a minimum set per transaction: txn_id, phase_fail, error_code, retries, duration_us, own_grant_us, recovery_level; compute P99 duration and error rate per phase.
Fix: Add bounded retries/timeouts and a recovery ladder; tie production gating to numeric thresholds and require evidence that fixes reduce the dominant phase_fail bucket.
Pass criteria: Logging coverage = 100%; timeout rate ≤ X ppm, retry rate ≤ X ppm, and recovery completes ≤ X ms for all recorded events.