An SPI bus is used to set device configurations, operating parameters, and read out diagnostic information on the DRV871x-Q1 devices. The SPI operates in slave mode and connects to a master controller. The SPI input data (SDI) word consists of a 16 bit word, with an 8 bit command and 8 bits of data. The SPI output data (SDO) word consists of the fault status indication bits and then the register data being accessed for read commands or null for write commands. The data sequence between the MCU and the SPI slave driver is shown in Figure 8-30.
Figure 8-30 SPI Data Frame
A valid frame must meet the following conditions:
- The SCLK pin should be low when the nSCS pin transitions from high to low and from low to high.
- The nSCS pin should be pulled high between words.
- When the nSCS pin is pulled high, any signals at the SCLK and SDI pins are ignored and the SDO pin is placed in the Hi-Z state.
- Data is captured on the falling edge of SCLK and data is propagated on the rising edge of SCLK.
- The most significant bit (MSB) is shifted in and out first.
- A full 16 SCLK cycles must occur for transaction to be valid.
- If the data word sent to the SDI pin is less than or more than 16 bits, a frame error (SCLK_FLT) occurs and the data word is ignored.
- For a write command, the existing data in the register being written to is shifted out on the SDO pin follow the 8 bit command data.
Figure 8-31 SPI Slave Timing Diagram