User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 540
UG585 (v1.11) September 27, 2016
Chapter 17: SPI Controller
Detection when Controller is enabled: If the controller is enabled (from a disabled state) at a
time when SS is Low (active), the controller will ignore the data and wait for the SCLK to be
inactive (a word boundary) before capturing data. The controller counts SCLK inactivity in the
SPI_Ref_Clk domain. A new word is assumed when the SCLK idle count reaches the value
programmed into the [Slave_Idle_coun] bit field.
Detection when SS asserts: With the controller enabled and SS is detected High (inactive), the
controller will assume the start of the word occurs on the next active edge of SCLK after SS
transitions Low (active).
Note: The start condition must be held active for at least four SPI_Ref_Clk cycles to be detected.
If slave mode is enabled at a time when the external master is very close to starting a data transfer,
there is a small probability that false synchronization will occur, causing packet corruption. This issue
can be avoided by any of the following means:
Ensure that the external master does not initiate data transfer until at least ten SPI_Ref_Clk
cycles have passed after slave mode has been enabled.
Ensure that slave mode is enabled before the external master is enabled.
Ensure that the slave select input signal is not active when the slave is enabled.
17.2.4 FIFOs
The Rx and Tx FIFOs are each 128 bytes deep.
RxFIFO
If the controller attempts to push data into a full RxFIFO then the content is lost and the sticky
overflow flag is set. No data is added to a full RxFIFO. Software writes a 1 to the bit to clear the
[RX_OVERFLOW] bit.
TxFIFO
If software attempts to write data into a full TxFIFO then the write is ignored. No data is added to a
full TxFIFO. The [TX_FIFO_full] bit is asserted until the TxFIFO is read and the TxFIFO is no longer full.
If the TxFIFO overflows, the sticky [RX_OVERFLOW] bit is set = 1.