35.5.2 SPI Mode 0 or Mode 3

The SQI peripheral supports the two most prominent SPI data flow modes, Mode 0 and Mode 3, which are controlled by the CPOL bit (CFG<4>) and the CPHA bit (CFG<3>). For additional details refer to SQI Data Flow Modes.

Mode 0 and Mode 3 are typical SPI modes of operation, which are differentiated by the CPOL and CPHA bit settings. When CPOL and CPHA are set to '0', the SQI module operates in Mode 0. When these two bits are set to '1', the SQI module operates in Mode 3.

As shown in the following figures, the primary difference between Mode 0 and Mode 3 concerns the state of SQI clock when the SQI controller is in Idle mode (i.e., no transfers are in progress). In Mode 0, the SQI clock stays low during Idle mode and in Mode 3, it stays high (provides a better clock edge entering active mode). In Mode 0, the SQI clock is held low at the start and the end of the SQI transfer cycle, whereas in Mode 3, the SQI clock is held high at the start and end of the transfer cycle. In both modes, the SQI data input in sampled on the rising edge of the SQI clock, and the SQI data output is clocked on the falling edge of the SQI clock.

Figure 35-4. Mode 0 (CPHA = 0, CPOL = 0)
Figure 35-5. Mode 3 (CPHA = 1, CPOL = 1)