
GR716-DS-UM, May 2019, Version 1.29
430
www.cobham.com/gaisler
GR716
43.3
System clock requirements and sampling
The core samples the incoming SPI SCK clock and does not introduce any additional clock domains
into the system. Both the SCK and MOSI lines first pass through two stage synchronizers and are then
filtered with a low pass filter.
The synchronizers and filters constrain the minimum system frequency. The core requires the SCK
signal to be stable for at least two system clock cycles before the core accepts the SCK value as the
new clock value. The core’s reaction to transitions will be additionally delayed since both lines are
taken through two-stage synchronizers before they are filtered. In order for the slave to be able to out-
put data on the SCK ‘change’ transition and for this data to reach the master before the next edge the
SCK frequency should not be higher than one tenth of the system frequency of core.
The slave select input should be asserted at least two system clock cycles before the SCK line starts
transitioning.
43.4
SPI instructions
43.4.1 Overview
The core is controlled from the SPI bus by sending SPI instructions. Some commands require addi-
tional bytes in the form of address or data. The core makes use of the same instructions as commonly
available SPI Flash devices. Table 577 summarizes the available instructions.
All instructions, addresses and data are transmitted with the most significant bit first. All AMBA
accesses are done in big endian format. The first byte sent to or from the slave is the most significant
byte.
43.4.2 SPI status/control register accesses (RDSR/WRSR)
The RDSR and WRSR instructions access the core’s SPI status/control register. The register is
accessed by issuing the wanted instruction followed by the data byte to be written (WRSR) or any
value on the byte in order to shift out the current value of the status/control register (RDSR). The
fields available in the SPI status/control register are shown in table 578.
Table 577.
SPI instructions
Instruction
Description
Instruction code Additional bytes
RDSR
Read status/control register
0x05
Core responds with register value
WRSR
Write status/control register
0x01
New register value
READ
AHB read access
0x03
Four address bytes, after which core responds
with data.
READD
AHB read access with dummy
byte
0x0B
Four address butes and one dummy byte, after
which core responds with data
WRITE
AHB write access
0x02
Four address bytes followed by data to be written
Table 578.
SPI2AHB SPI status/control register
7
6
5
4
3
2
1
0
Reserved RAHEAD
PROT
MEXC
DMAACT
MALF
HSIZE
7
Reserved, always zero (read only)
6
Read ahead (RAHEAD) - When this bit is set the core will make a new access to
fetch data as soon as the last current data bit has been moved. Otherwise the core
will not attempt the new access until the ‘change’ transition on SCK. Setting this bit
to ‘1’ allows higher SCK frequencies to be used but will also result in a data fetch as
soon as the current data has been read out. This means that RAHEAD may not be
suitable when accessing FIFO interfaces. (read/write)