embeddedtoolkitBETA
PROTOCOL / IDEAL DIGITAL MODEL

SPI AnalyzerMemory → frames → wire. Assumptions included.

Link configuration

MISO is synthetic input, not a device capture. Arrays use two hex digits per byte. Containers use ceil(frame bits / 8) bytes with zero high padding. Dense mode always reads memory bits MSB first; endian is not applied. Wire bit order is independent.

CS, FIFO and DMA scenario assumptions

Explicit assumption: a batch is fully transmitted before service pauses SCK. The first batch is preloaded; service waits occur only between batches. No simultaneous CPU/DMA refill, arbitration, FIFO thresholds, underflow, cache coherence, hardware CS behavior or bus latency is inferred. DMA burst must fit the model FIFO depth. One cycle means one SCK period. Per-frame CS with zero gap has zero modeled high dwell; actual CS timing minima are not checked.

Full-duplex timing

Ideal digital edges, not electrical timing validation. Dots mark sampling edges. The view shows the first 1–8 frames; calculations include every frame.

Accessible edge event table
Frame:BitHalf-cycle tickEdgeEventMOSIMISO
Frame Pack / Unpack — all frames
Frame / BatchTX / RXMOSI / MISO wire bitsRepacked TX bytes

TX / RX memory bytes

Visual addresses only. Containers include per-frame high padding; dense bytes include final low padding. This layout does not dictate wire bit order.

Reference C serialization

BYTE ORDER ≠ BIT ORDER

Choose a memory model, then a wire order.

For a 12-bit frame 0x123, big-endian container bytes are 01 23; little-endian bytes are 23 01. In either case MSB First transmits 000100100011. LSB First transmits 110001001000. The four unused high container bits never reach the wire.

Dense packing concatenates numeric frame bits MSB first and stores bytes in ascending addresses. Specify valid bits when the last byte contains padding. If a partial frame is explicitly zero-padded, only original useful bits count toward payload throughput. CS overhead and modeled stalls reduce throughput; full-duplex RX does not double transfer duration.

SAMPLING / SHIFT

Mode rules, without hardware guesses.

CPHA 0 samples on the leading edge and shifts on the trailing edge, with the first bit preloaded. CPHA 1 shifts on the leading edge and samples on the trailing edge. CPOL selects the idle SCK level. Both directions use the same clock. Propagation, setup/hold margins and MISO high impedance outside CS are not electrically modeled; idle data is drawn held for readability.

Analog Devices · SPI modes

C output is a portable reference for arrays and bit sampling, not a driver for any vendor’s SPI/FIFO/DMA hardware. Consult the actual controller and target device documentation before using it in firmware.

Continue in another tool

Transfers the current unsigned value and width to a new same-origin tab through memory only. SPI sends the first TX frame, zero-extended to 8/16/32 bits, and accepts up to 32 bits. No values are added to URLs or saved.

Related tools (open without a value)