wire / wire-format / spi-protocol

SPI (Serial Peripheral Interface) protocol

SPI is a 4-wire synchronous serial bus: SCLK (clock), MOSI (master out slave in), MISO (master in slave out), CS (chip select). Communication: master asserts CS (low), toggles SCLK, sends data on MOSI, receives data on MISO. No addressing (CS selects the slave). No ACK. Full-duplex (simultaneous send/receive).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: SPI (Serial Peripheral Interface) protocol

wire format

spec: SPI specification

SPI is a 4-wire synchronous serial bus: SCLK (clock), MOSI (master out slave in), MISO (master in slave out), CS (chip select). Communication: master asserts CS (low), toggles SCLK, sends data on MOSI, receives data on MISO. No addressing (CS selects the slave). No ACK. Full-duplex (simultaneous send/receive).

fieldsizemeaning
SCLKclockSerial clock, generated by the master. Frequency up to tens of MHz.
MOSIdataMaster Out Slave In: data from master to slave.
MISOdataMaster In Slave Out: data from slave to master.
CS (SS)controlChip Select (Slave Select): active low. Master asserts CS to select a slave.
CPOLmodeClock Polarity: 0 = clock idle low, 1 = clock idle high.
CPHAmodeClock Phase: 0 = sample on leading edge, 1 = sample on trailing edge.
Mode 0CPOL=0, CPHA=0Clock idle low, sample on rising edge.
Mode 1CPOL=0, CPHA=1Clock idle low, sample on falling edge.
Mode 2CPOL=1, CPHA=0Clock idle high, sample on falling edge.
Mode 3CPOL=1, CPHA=1Clock idle high, sample on rising edge.
MSB/LSB firstconfigMost SPI devices use MSB-first. Some use LSB-first.

example:

00 00

SPI: two zero bytes (no standard wire format; shown as placeholder)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/spi-protocol or /wire-format/spi-protocol.json