![Altera Cyclone V Device Handbook Download Page 930](http://html1.mh-extra.com/html/altera/cyclone-v/cyclone-v_device-handbook_2910791930.webp)
transmission. The data transfer occurs as normal according to the selected frame format (serial protocol).
The receive data from the target device is moved from the receive shift register into the receive FIFO buffer
at the end of each data frame. You should mask interrupts originating from the transmit logic when this
mode is entered. †
EEPROM Read
This transfer mode is only valid for serial masters. †
Note:
When TMOD = 3, the transmit data is used to transmit an opcode and/or an address to the EEPROM device.
This takes three data frames (8-bit opcode followed by 8-bit upper address and 8-bit lower address). During
the transmission of the opcode and address, no data is captured by the receive logic (as long as the SPI master
is transmitting data on its
txd
line, data on the
rxd
line is ignored). The SPI master continues to transmit
data until the transmit FIFO buffer is empty. You should ONLY have enough data frames in the transmit
FIFO buffer to supply the opcode and address to the EEPROM. If more data frames are in the transmit FIFO
buffer than are needed, then Read data is lost. †
When the transmit FIFO buffer becomes empty (all control information has been sent), data on the receive
line (
rxd
) is valid and is stored in the receive FIFO buffer; the
txd
output is held at a constant logic level.
The serial transfer continues until the number of data frames received by the SPI master matches the value
of the NDF field in the
CTRLR1
register plus one. †
EEPROM read mode is not supported when the SPI controller is configured to be in the SSP mode.
†
Note:
SPI Master
The SPI master initiates and controls all serial transfers with serial-slave peripheral devices. †
The serial bit-rate clock, generated and controlled by the SPI controller, is driven out on the
sclk_out
line. When the SPI controller is disabled, no serial transfers can occur and
sclk_out
is held in “inactive”
state, as defined by the serial protocol under which it operates. †
Related Information
on page 19-2
RXD Sample Delay
SPI master device is capable of delaying the default sample time of the
rxd
signal in order to increase the
maximum achievable frequency on the serial bus.
Round trip routing delays on the
sclk_out
signal from the master and the
rxd
signal from the slave can
mean that the timing of the
rxd
signal, as seen by the master, has moved away from the normal sampling
time.
Without the RXD sample delay, you must increase the baud rate for the transfer in order to ensure that the
setup times on the
rxd
signal are within range. This reduces the frequency of the serial interface.
Additional logic is included in the SPI master to delay the default sample time of the
rxd
signal. This
additional logic can help to increase the maximum achievable frequency on the serial bus. †
By writing to the
rsd
field of the RX Sample Delay Register (
rx_sample_dly
), you specify an additional
amount of delay applied to the
rxd
sample, in number of
spi_m_clk
clock cycles, up to 64 cycles. If the
rsd
field is programmed with a value exceeding 64, zero delay is applied to the
rxd
sample.
Round trip routing delays on the
sclk_out
signal from the master and the
rxd
signal from the slave can
mean that the timing of the
rxd
signal, as seen by the master, has moved away from the normal sampling
Altera Corporation
SPI Controller
19-7
EEPROM Read
cv_54019
2013.12.30