SBOA621 August 2025 TXE8116 , TXE8116-Q1 , TXE8124-Q1
The Serial Peripheral Interface (SPI) bus is a widely used synchronous communication protocol that enables high-speed, full-duplex data transfer between a controller device and one or more peripheral devices. SPI was developed by Motorola in the 1980s and has since become a standard interface for connecting peripherals in embedded systems. Its simplicity, versatility, and efficiency make it an essential tool for engineers designing systems that require reliable and fast communication. Figure 1 illustrates the typical diagram of SPI connections on the bus.
The SPI communication is synchronized using a shared clock signal, ensuring precise data transfer timing. Unlike other serial protocols such as inter-integrated circuit (I2C), serial peripheral interface (SPI) does not define a standard communication format, allowing developers to tailor the protocol to specific application requirements. Table 1 shows the difference of SPI, I2C and universal asynchronous receiver/transmitter (UART).
| Feature | SPI | I2C | UART |
|---|---|---|---|
| Communication Type | Synchronous | Synchronous | Asynchronous |
| Data Transfer Mode | Full-Duplex | Half-Duplex | Full-Duplex |
| Clock Signal | Yes | Yes | No |
| Addressing | Chip-Select (CS) Line | Addressing Protocol | Not Applicable |
| Speed | High | Medium | Low |
SPI enables full-duplex communication, meaning data can be sent and received simultaneously. The protocol uses a set of primary signals to establish communication, which can vary based on the SPI configuration.
| Signal Name | Usage |
|---|---|
| PICO (Controller SDO, Peripheral SDI) | Send data from the controller to the peripheral |
| POCI (Controller SDI, Peripheral SDO) | Send data from the peripheral to the controller |
| SCLK (Serial Clock) | Generated by the controller to synchronize data transfer |
| CS (Chip Select) | An active-low signal used by the controller to select and enable a specific peripheral device |
The architecture of the SPI bus is straightforward, consisting of one controller and one or more peripheral devices. The controller initiates communication, controls the clock, and selects the peripheral to communicate with. The architecture supports three main configurations:
SPI supports four modes of operation, determined by the clock polarity (CPOL) and clock phase (CPHA). These modes shown in Table 3 define the behavior of the clock signal and the timing of data sampling.
| Mode | CPOL | CPHA | Description |
|---|---|---|---|
| Mode 0 | 0 | 0 | Data is sampled on the rising edge of the clock, and the clock idles low. |
| Mode 1 | 0 | 1 | Data is sampled on the falling edge of the clock, and the clock idles low. |
| Mode 2 | 1 | 0 | Data is sampled on the falling edge of the clock, and the clock idles high. |
| Mode 3 | 1 | 1 | Data is sampled on the rising edge of the clock, and the clock idles high. |
As SPI is a synchronous full-duplex communication protocol that allows data exchange between a controller and one or more peripheral devices. TI's TXE8116/24 device uses a fixed 24-bit SPI transaction format, transmitted MSB first, in SPI mode 0 (CPOL = 0, CPHA = 0). The device supports full-duplex operation, where incoming command frames and outgoing data or status frames are exchanged simultaneously. Each SPI transaction must begin with the CS signal pulled low, and remain low for the entire 24-bit sequence. Figure 2 illustrates the SPI data frame in TXE8116/24 device.
To write to a register, the controller transmits a 24-bit word with the MSB (bit 23) set to 0. The register address is encoded in bits [22:16], and bits [15:8] select the target GPIO port or configure multi-port mode. The final 8 bits [7:0] carry the actual data to be written.
To read from a register, the host sets bit 23 to 1 and transmits the desired register address. The lower 16 bits can contain dummy data. During this same transfer, the TXE8124 returns the current value of the addressed register on the POCI line.
| Parameter | Description | Typical Value |
|---|---|---|
| tSCLK | SPI clock period (3.3V < VCC < 5.5V) | 100ns (10MHz) |
| tCSS / tCSH | CS setup/hold time | ≥50ns |
| tV(SDO) | POCI valid after SCLK edge | ≤27ns |
| tDIS(SDO) | POCI high-Z after CS deasserted | ≤50ns |
All SPI transactions must meet minimum timing constraints as specified in the TXE81xx-Q1 Automotive 24-Bit SPI Bus I/O Expander with Interrupt Output, Reset Input, and I/O Configuration Registers Data Sheet to maintain correct communication.