Operations
SPI_MOSI: When SPI_SSEL is asserted (low) and SPI_CLK is active, the device outputs the data on this
line at the SPI_CLK rate. When SPI_SSEL is de-asserted (high), you should tri-state this output such
that another slave device can drive the line.
SPI_MISO: The SPI master outputs data on this line at the SPI_CLK rate after it selects the desired
slave. When you configure the device for SPI operations, this pin is an input.
SPI_CLK: The SPI master outputs a low signal on this line to select the desired slave. When you
configure the device for SPI operations, this pin is an input. This signal clocks data transfers on MOSI
and MISO.
SPI_SSEL: The SPI master outputs a clock on this pin, and the rate must not exceed the maximum
allowed, 6 Mb/s. When you configure the device for SPI operations, this pin is an input. This signal
enables serial communication with the slave.
SPI_ATTN: The device asserts this pin low when it has data to send to the SPI master. When you
configure this pin for SPI operations, it is an output (not tri-stated). This signal alerts the master that
the slave has data queued to send. The device asserts this pin as soon as data is available to send to
the SPI master and it remains asserted until the SPI master has clocked out all available data.
Slave mode characteristics
In slave mode, the following apply:
SPI Clock rates up to 6 MHz (6 Mb/s) are possible.
n
Data is MSB first.
n
It uses Frame Format Mode 0. This means CPOL= 0 (idle clock is low) and CPHA = 0 (data is
n
sampled on the clock's leading edge). The picture below diagrams Mode 0.
The SPI port is setup for API mode and is equivalent to AP = 1.
n
The following picture shows the frame format for SPI communications.
Full duplex operation
When using SPI on the XLR PRO RF Module the device uses API operation (AP = 1) without escaped
characters to packetize data. SPI is a full duplex protocol, even when data is only available in one
direction. This means that whenever a device receives data, it also transmits, and that data is
normally invalid. Likewise, whenever a device transmits data, invalid data is probably received. To
determine whether or not received data is invalid, the firmware places the data in API packets.
SPI allows for valid data from the slave to begin before, at the same time, or after valid data begins
from the master. When the master sends data to the slave and the slave has valid data to send in the
middle of receiving data from the master, a full duplex operation occurs, where data is valid in both
XLR PRO Radio Frequency (RF) Module User Guide
Slave mode characteristics
35