Serial Peripheral Interface Bus - Standards

Standards

The SPI bus is a de facto standard. However, the lack of a formal standard is reflected in a wide variety of protocol options. Different word sizes are common. Every device defines its own protocol, including whether or not it supports commands at all. Some devices are transmit-only; others are receive-only. Chip selects are sometimes active-high rather than active-low. Some protocols send the least significant bit first.

Some devices even have minor variances from the CPOL/CPHA modes described above. Sending data from slave to master may use the opposite clock edge as master to slave. Devices often require extra clock idle time before the first clock or after the last one, or between a command and its response. Some devices have two clocks, one to read data, and another to transmit it into the device. Many of the read clocks run from the chip select line.

Some devices require an additional flow control signal from slave to master, indicating when data are ready. This leads to a 5-wire protocol instead of the usual 4. Such a ready or enable signal is often active-low, and needs to be enabled at key points such as after commands or between words. Without such a signal, data transfer rates may need to be slowed down significantly, or protocols may need to have dummy bytes inserted, to accommodate the worst case for the slave response time. Examples include initiating an ADC conversion, addressing the right page of flash memory, and processing enough of a command that device firmware can load the first word of the response. (Many SPI masters don't support that signal directly, and instead rely on fixed delays.)

Many SPI chips only support messages that are multiples of 8 bits. Such chips can not interoperate with the JTAG or SGPIO protocols, or any other protocol that requires messages that are not multiples of 8 bits.

There are also hardware-level differences. Some chips combine MOSI and MISO into a single data line (SI/SO); this is sometimes called three-wire signaling (in contrast to normal four-wire SPI). Another variation of SPI removes the chip select line, managing protocol state machine entry/exit using other methods; this isn't usually called three-wire though. Anyone needing an external connector for SPI defines their own: UEXT, JTAG connector, Secure Digital card socket, etc. Signal levels depend entirely on the chips involved.

Read more about this topic:  Serial Peripheral Interface Bus

Famous quotes containing the word standards:

    With his brows knit, his mind made up, his will resolved and resistless, he advances, crashing his way through the host of weak, half-formed, dilettante opinions, honest and dishonest ways of thinking, with their standards raised, sentimentalities and conjectures, and tramples them all into dust. See how he prevails; you don’t even hear the groans of the wounded and dying.
    Henry David Thoreau (1817–1862)

    A generation which has passed through the shop has absorbed standards and ambitions which are not of those of spaciousness, and cannot get away from them. Everything with them is done as though for sale, and they naturally have in view the greatest possible benefit, profit and that end of the stuff that will make the best show.
    Alexander Herzen (1812–1870)

    Measured by any standard known to science—by horse-power, calories, volts, mass in any shape,—the tension and vibration and volume and so-called progression of society were full a thousand times greater in 1900 than in 1800;Mthe force had doubled ten times over, and the speed, when measured by electrical standards as in telegraphy, approached infinity, and had annihilated both space and time. No law of material movement applied to it.
    Henry Brooks Adams (1838–1918)