Altera Cyclone V Device Handbook page 937

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

19-14
National Semiconductor Microwire Protocol
Figure 19-8: SSP Serial Format Continuous Transfer
sclk_out/in
txd/rxd
ss_0_n/ss_in_n
ss_oe_n
National Semiconductor Microwire Protocol
For the master SPI, data transmission begins as soon as the output enable signal is deasserted. One-half serial
clock (sclk_out) period later, the first bit of the control is sent out on the txd line. The length of the
control word can be in the range 1 to 16 bits and is set by writing bit field CFS (bits 15:12) in CTRLR0. The
remainder of the control word is transmitted (propagated on the falling edge of sclk_ou t) by the SPI
serial master. During this transmission, no data are present (high impedance) on the serial master's rxd
line. †
The direction of the data word is controlled by the MDD bit field (bit 1) in the Microwire Control Register
(MWCR). When MDD=0, this indicates that the SPI serial master receives data from the external serial slave.
One clock cycle after the LSB of the control word is transmitted, the slave peripheral responds with a dummy
0 bit, followed by the data frame, which can be 4 to 16 bits in length. Data are propagated on the falling edge
of the serial clock and captured on the rising edge. †
Continuous transfers from the Microwire protocol can be sequential or nonsequential, and are controlled
by the MWMOD bit field (bit 0) in the MWCR. †
Nonsequential continuous transfers occur, with the control word for the next transfer following immediately
after the LSB of the current data word. †
The only modification needed to perform a continuous nonsequential transfer is to write more control words
into the transmit FIFO buffer. †
During sequential continuous transfers, only one control word is transmitted from the SPI master. The
transfer is started in the same manner as with nonsequential read operations, but the cycle is continued to
read further data. The slave device automatically increments its address pointer to the next location and
continues to provide data from that location. Any number of locations can be read in this manner; the SPI
master terminates the transfer when the number of words received is equal to the value in the CTRLR1
register plus one. †
When MDD = 1, this indicates that the SPI serial master transmits data to the external serial slave. Immediately
after the LSB of the control word is transmitted, the SPI master begins transmitting the data frame to the
slave peripheral. †
Note:
The SPI controller does not support continuous sequential Microwire writes, where MDD = 1 and
MWMOD = 1. †
Continuous transfers occur with the control word for the next transfer following immediately after the LSB
of the current data word.
The Microwire handshaking interface can also be enabled for SPI master write operations to external serial-
slave devices. To enable the handshaking interface, you must write 1 into the MHS bit field (bit 2) on the
Altera Corporation
MSB
LSB
MSB
SPI Controller
Send Feedback
cv_54019
2013.12.30

Advertisement

Table of Contents
loading

Table of Contents