User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 532
UG585 (v1.11) September 27, 2016
Chapter 17
SPI Controller
17.1 Introduction
The SPI bus controller enables communications with a variety of peripherals such as memories,
temperature sensors, pressure sensors, analog converters, real-time clocks, displays, and any SD card
with serial mode support. The SPI controller can function in master mode, slave mode or
multi-master mode. The Zynq-7000 devices include two SPI controllers. The controller is based on
the Cadence SPI core.
In master mode, the controller drives the serial clock and slave selects with an option to support SPI’s
multi-master mode. The serial clock is derived from the PS clock subsystem. The controller initiates
messages using up to 3 individual slave select (SS) output signals that can be externally expanded.
The controller reads and writes to slave devices by writing bytes to the 32-bit read/write data port
register.
In multi-master mode, the controller three-states its output signals when the controller is not active
and can detect contention errors when enabled. The outputs are three-stated immediately by
resetting the SPI enable bit. An Interrupt Status register indicates a mode fault.
In slave mode, the controller receives the serial clock from the external device and uses the
SPI_Ref_Clk to synchronize data capture. The slave mode includes a programmable start detection
mechanism when the controller is enabled while the SS is asserted.
The read and write FIFOs provide buffering between the SPI I/O interface and the software servicing
the controller via the APB slave interface. The FIFO are used for both slave and master I/O modes.
This chapter is organized into the following sections:
17.1 Introduction
17.2 Functional Description
17.3 Programming Guide
17.4 System Functions
17.5 I/O Interfaces