47.5.5 Client Select Synchronization

The Client Select pin (SS) allows a synchronous Client mode. It can be used as a switch to enable or disable the function of a SPI client device. If the SPIxC- TRL_*.MSSEN bit is set, transmission/reception is enabled in Client mode only if the SS pin is driven to a low state. If the SPIxCTRL_*.MSSEN bit is set and the SS pin is driven high, the SDO pin is no longer driven and will tri-state even in the middle of a transmission. An aborted transmission will be retried the next time the SS pin is driven low. After one transmit/receive sequence, if the SS pin is still held low, the transmission should continue with the data available in the SPIxTXB register. If the transmit buffer (SPIxTXB) were empty at that time, the data received in the store register would be sent out. If the SPIxCTRL_*.MSSEN bit is not set, the SS pin does not affect the macro operation in Client mode. The SS pin must asynchronously control the SDO tri-state function. If the SS pin is asserted again after it had been de-asserted in the middle of a transmit/receive sequence, the transmission/reception will again begin with the most significant bit of the previously aborted data.

If SPIxCTRL_*.MSSEN is clear, the function of SPIxSTAT.SPITBE in Client mode is similar to that of the Host mode. When it is set, the SPIxSTAT.SPITBE is set only when the macro completes data transmission, unlike in Host mode of operation. Since transmission will be aborted at any time the SS pin goes high, to complete the transmission when SS is again driven low, the data must be held in SPIxTXB until all bits are transmitted to the receiver.

Figure 47-8. Client Synchronization Timing (Mode16=0, Mode32=0, MSSEN=1, Mode_EN=0)

In Client mode, the clocks are input via the SCK pin. In this case, SPIxCTRL_*.MSSEN = 0, and therefore, the SS pin is unused. The incoming data is sampled at the middle of data output time.

Figure 47-9. SPI Mode Timing (Client Mode W/CPHA=1 and MSSEN=0; Mode16=0, Mode32=0, Mode_EN=0

In this case, SPIxCTRL_*.MSSEN = 1, and therefore, the SS pin is used by the macro. Since the transmission may be interrupted when the SS pin goes high, the behavior of the SPIxSTAT.SPITBE bit is different than when SPIxCTRL_*.MSSEN = 0.

Figure 47-10. SPI Mode Timing (Client Mode WW/CPHA=1 and MSSEN=1; Mode16=0, Mode32=0, Mode_EN=0