Reference manual 366 002-27293 Rev. *E
2023-09-06
PSoC™ 61, PSoC™ 62 MCU: CY8C6xx5 architecture
Serial Communications Block (SCB)
27.3.2 General description
Figure 27-1 illustrates an example of SPI master with four slaves.
Figure 27-1. SPI example
A standard SPI interface consists of four signals as follows.
• SCLK: Serial clock (clock output from the master, input to the slave).
• MOSI: Master-out-slave-in (data output from the master, input to the slave).
• MISO: Master-in-slave-out (data input to the master, output from the slave).
•Slave Select (SS
): Typically an active low signal (output from the master, input to the slave).
A simple SPI data transfer involves the following: the master selects a slave by driving its SS
line, then it drives
data on the MOSI line and a clock on the SCLK line. The slave uses either of the edges of SCLK depending on the
configuration to capture the data on the MOSI line; it also drives data on the MISO line, which is captured by the
master.
27.3.2.1 Transfer separation
This parameter determines if individual data transfers are separated by slave select deselection, which is
controlled by SCB_SPI_CTRL.SSEL_CONTINUOUS (only applicable for Master mode):
• Continuous – The slave select line is held in active state until the end of transfer (default).
The master assigns the slave select output after data has been written into the TX FIFO and keeps it active as
long as there are data elements to transmit. The slave select output becomes inactive when all data elements
have been transmitted from the TX FIFO and shifter register.
Note: This can happen even in the middle of the transfer if the TX FIFO is not loaded fast enough by the CPU
or DMA. To overcome this behavior, the slave select can be controlled by firmware.
• Separated – Every data frame 4-16 bits is separated by slave select line deselection by one SCLK period.
SPI
Master
SPI
Slave 1
SPI
Slave 2
SPI
Slave 4
SCLK
MOSI
MISO
Slave Select (SS) 2
Slave Select (SS) 4
SPI
Slave 3
Slave Select (SS) 3
Slave Select (SS) 1