SBOA542 November 2022 TMP1826 , TMP1827
The Serial Peripheral Interface (SPI) is another common peripheral found on most MCUs. SPI is a full- or half-duplex synchronous interface generally reserved for high-speed data transfers. The transmit function is a push-pull pin while the receive function is an input function. Similar to the UART implementation, Figure 2-14 shows a method to reconfigure the interface to function as a single-wire interface.
Depending on the implementation, the SPI bus can have variable data lengths from 4 bits to 32 bits along with a serial clock pin. Additionally, clock (CPOL) and data (CPHA) polarity are used to defined the mode of operation. For interfacing the SPI peripheral from a host MCU to the single-wire bus, use an 8-bit data length and mode-1 (CPOL = 0, CPHA = 1) of operation. Similar to UART bus, Table 2-2 provides the reference clock rates required by bus reset and data bits for standard and overdrive bus speed.
SPI Clock for Single-Wire Standard Speed | SPI Clock for Single-Wire Overdrive Speed | ||
---|---|---|---|
Bus Reset | Data Bit | Bus Reset | Data Bit |
16000 Hz | 125000 Hz | 100500 Hz | 500000 Hz |