User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 546
UG585 (v1.11) September 27, 2016
Chapter 17: SPI Controller
a. Read data from the spi.Rx_Data_reg register. Continue to receive bytes using the data byte
counter.
6. Fill the TxFIFO: More data can be written to the TxFIFO, if needed:
a. Write data to the spi.Tx_Data_reg0 register.
b. Continue to fill data until FIFO depth is reached or there is no further data.
c. Increment the data byte counter after each byte is pushed.
7. Check for overflow or underflow: Read the [TX_FIFO_underflow] or [RX_OVERFLOW] status
bits. Handle the overflow and underflow conditions accordingly.
8. Enable the interrupts: If more data need to be transmitted or received, set spi.Intrpt_en_reg0
[TX_FIFO_not_full] and [RX_FIFO_full] both = 1.
9. If there is data to be transferred (Sent/Received), then start the data transfer:
°
When in master mode, and data transfer is done using manual start (for both manual/auto
SS), set spi.Config_reg [Man_start_en] = 1.
17.3.6 Register Overview
The SPI registers are detailed Appendix B, Register Details. The register overview is provided in
Table 17-2.
17.4 System Functions
17.4.1 Resets
17.4.2 Clocks
Table 17-2: SPI Register Overview
Type Register Name Description
Controller
Configuration
Config_reg0 Configuration
Controller enable En_reg0 SPI controller enable
Interrupt
Intr_status_reg0 Interrupt status (Rx full, not empty and Tx full, not full)
Intrpt_en_reg0 Interrupt enable
Intrpt_dis_reg0 Interrupt disable
Intrpt_mask_reg0 Interrupt mask/enable
FIFO thresholds
TX_thres_reg0 TxFIFO threshold level for not full
RX_thres_reg0 RxFIFO Threshold level for not empty
Master mode Delay_reg0 SS delays and separation counts in master mode
FIFO data ports
Tx_data_reg0 Transmit data (TxFIFO)
Rx_data_reg0 Receive data (RxFIFO)
Slave mode Slave_Idle_count_reg0 Slave idle count detects inactive SCLK