User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 549
UG585 (v1.11) September 27, 2016
Chapter 17: SPI Controller
The clock phase parameter defines the state of the SS between words and the state of SCLK when the
controller is not transmitting bits. The phase and polarity parameters are summarized in Table 17-4
and illustrated in Figure 17-5.
Clock Phase Setting, CPHA (CLK_PH)
In master mode, the value of the clock phase bit, spi.Config_reg0 [CLK_PH] affects the I/O protocol
using parameters in the spi.Delay_reg0 register as follows (see Figure 17-5):
CLK_PH = 0
SS Activity: The master automatically drives the SS outputs inactive (High) for a the time
programmed into the spi.Delay_reg0 [d_nss] bit field: Time = (1 + [d_nss]) * SPI_Ref_Clk clock
period. The minimum time is 2 SPI_Ref_Clk clock periods.
Delay between Words: The delay between the last bit period of the current word and the first
bit period on the next word: Time = (2 + [d_btwn]) * SPI_Ref_Clk clock period. The minimum
time is 3 SPI_Ref_Clk clock periods. This delay enables the TxFIFO to be unloaded and ready for
the next parallel-to-serial conversion and to toggle slave select inactive High.
CLK_PH = 1
SS Activity: The SS output signals are not driven inactive between words.
Delay between Words: The minimum delay between the last bit period of the current word and
the first bit period on the next word is, by default, one SPI_Ref_Clk cycles (configurable by the
spi.Delay_reg0 register). This allows the TxFIFO to be unloaded and ready for the next parallel-to
serial-conversion.
Table 17-4: SPI Clock Phase and Polarity Controls
CLK_PH = 0 CLK_PH = 1
CLK_POL = 0 CLK_POL = 1 CLK_POL = 0 CLK_POL = 1
Driving Edge negative positive positive negative
Sampling Edge positive negative negative positive
SS State between Words active inactive
SCLK State outside of Word active inactive