
GR716-DS-UM, May 2019, Version 1.29
435
www.cobham.com/gaisler
GR716
ordering, clock gap insertion, automatic slave select and automatic periodic transfers of a specified
length. All SPI modes are supported and also a 3-wire mode where one bidirectional data line is used.
In slave mode the core synchronizes the incoming clock and can operate in systems where other SPI
devices are driven by asynchronous clocks.
44.2
Operation
44.2.1 SPI transmission protocol
The SPI bus is a full-duplex synchronous serial bus. Transmission starts when a master selects a slave
through the slave’s Slave Select (SLVSEL) signal and the clock line SCK transitions from its idle
state. Data is transferred from the master through the Master-Output-Slave-Input (MOSI) signal and
from the slave through the Master-Input-Slave-Output (MISO) signal. In a system with only one mas-
ter and one slave, the Slave Select input of the slave may be always active and the master does not
need to have a slave select output. If the core is configured as a master it will monitor the SPISEL sig-
nal to detect collisions with other masters, if SPISEL is activated the master will be disabled.
During a transmission on the SPI bus data is either changed or read at a transition of SCK. If data has
been read at edge n, data is changed at edge n+1. If data is read at the first transition of SCK the bus is
said to have clock phase 0, and if data is changed at the first transition of SCK the bus has clock phase
1. The idle state of SCK may be either high or low. If the idle state of SCK is low, the bus has clock
polarity 0 and if the idle state is high the clock polarity is 1. The combined values of clock polarity
(CPOL) and clock phase (CPHA) determine the mode of the SPI bus. Figure 74 shows one byte
(0x55) being transferred MSb first over the SPI bus under the four different modes. Note that the idle
state of the MOSI line is ‘1’ and that CPHA = 0 means that the devices must have data ready before
the first transition of SCK. The figure does not include the MISO signal, the behavior of this line is
the same as for the MOSI signal. However, due to synchronization issues the MISO signal will be
delayed when the core is operating in slave mode, please see section 44.2.5 for details.
Figure 73.
Block diagram
A
M
B
A
A
P
B
Transmit
MISO
Mode register
Event register
Mask register
Com. register
Transmit register
Receive register
Slave select reg.
FIFO
Receive
FIFO
SCK
Control
Master ctrl
Slave ctrl
Clock gen.
S
y
n
c
r
e
g
i
s
t
e
r
s
SPISEL
SLVSEL
MOSI
SPICTRL