User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 538
UG585 (v1.11) September 27, 2016
Chapter 17: SPI Controller
Manual SS
Software selects the manual slave select method by setting the spi.Config_reg0 [Manual_CS] bit = 1.
In this mode, software must explicitly control the slave select assertion/de-assertion. When the
[Manual_CS] bit = 0, the controller hardware automatically asserts the slave select during a data
transfer.
Automatic SS
Software selects the auto slave select method by programming the spi.Config_reg0 [Manual_CS] bit
= 0. The SPI controller asserts/de-asserts the slave select for each transfer of TxFIFO content on to
the MOSI signal. Software writes data to the TxFIFO and the controller asserts the slave select
automatically, transmits the data in the TxFIFO and then de-asserts the slave select. The slave select
gets de-asserted after all the data in the Tx FIFO is transmitted. This is the end of the transfer.
Software ensures the following in automatic slave select mode.
Software continuously fills the TxFIFO with the data bytes to be transmitted, without the TxFIFO
becoming empty, to maintain an asserted slave select.
Software continuously reads data bytes received in the RxFIFO to avoid overflow.
Software uses the TxFIFO and RxFIFO threshold levels to avoid FIFO under- and over-flows. The
TxFIFO Not Full condition is flagged when the number of bytes in TxFIFO is less than the TxFIFO
threshold level. The RxFIFO full condition is flagged when the number of bytes in RxFIFO is equal to
128.
Manual Start
Enable
Software selects the manual transfer method by setting the spi.Config_reg0 [Man_start_en] bit = 1.
In this mode, software must explicitly start the data transfer using manual start command
mechanism. When the [Man_start_en] bit = 0, the controller hardware automatically starts the data
transfer when there is data available in the TxFIFO.
Auto SS
(controller)
Manual Start 0 1
Controller hardware controls the slave select, but
the software must issue the start command to
serialize data in the TxFIFO. This mode is applicable
for specific use cases such as sending small chunks
of data that fit into the SPI controller FIFO.
Auto Start 00
Controller hardware controls the slave select and
serializes data when there is data in the TxFIFO.
Table 17-1: SPI Master Mode SS and Start Modes (Contd)
Slave Select
Control
Data Transfer
Start Control
Manual
Slave
Select
Manual Start
Enable &
Command
Operation