
GR716-DS-UM, May 2019, Version 1.29
447
www.cobham.com/gaisler
GR716
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.
45.4
Operation
The data transfer between the master and the slave is through APB registers or through command
transfer from a master is determined by the EN bit in the SPI2 control register. When APB registers
are used the data transferred by a master is available at receive registers (NRDATA or RRDATA
depending on the port used) while during the same reception period the contents of the transmit regis-
ters (TDATA) are transferred to the master. When appropriate commands are transferred by a master
SPI device and EN bit in the SPI2 control register is enabled then the commands are processed by the
SPI 2 protocol handler available in this core. The SPI protocol 2 implementation is explained in detail
in the following section.
45.5
SPI 2 Protocol Handler
The core is capable of handling the commands (based on SPI protocol 2) transferred by a SPI master
and provide response. The message format transferred between a SPI master and SPI slave device is
defined below.
Table 594.
Example message format (write data)
Signal
Message Header
Payload
Payload CRC
MOSI
Command #1
Command #2
Data
CRC-16
MISO
Response #1
Response #2
0x0000
0x0000
Figure 77.
SPI transfer of byte 0x55 in all modes
SCK
MOSI
CPOL = 0
CPHA = 0
CPHA = 1
CPOL = 1
CPHA = 0
CPHA = 1
Mode 0
Mode 1
Mode 2
Mode 3
SCK
MOSI
SCK
MOSI
SCK
MOSI