Operations
directions for a period of time. Not only must the master and the slave both be able to keep up with
the full duplex operation, but both sides must honor the protocol.
The following figure illustrates the SPI interface while valid data is being sent in both directions.
Configuration considerations
The configuration considerations are:
How do you select the serial port? For example, should you use the UART or the SPI port?
n
If you use the SPI port, what data format should you use in order to avoid processing invalid
n
characters while transmitting?
What SPI options do you need to configure?
n
SPI and API mode
The SPI only operates in API mode 1. The SPI does not support Transparent mode or API mode 2 (with
escaped characters). This means that the AP configuration only applies to the UART interface and is
ignored while using the SPI.
SPI parameters
Most host processors with SPI hardware allow you to set the bit order, clock phase and polarity. For
communication with all XLR PRO RF Modules, the host processor must set these options as follows:
Bit order: send MSB first
n
Clock phase (CPHA): sample data on first (leading) edge
n
Clock polarity (CPOL): first (leading) edge rises
n
All XLR PRO RF Modules use SPI mode 0 and MSB first. Mode 0 means that data is sampled on the
leading edge and that the leading edge rises. MSB first means that bit 7 is the first bit of a byte sent
over the interface.
Serial port selection
To enable the UART port, configure DIN and DOUT (P3 and P4 parameters) as peripherals. To enable
the SPI port, enable SPI_MISO, SPI_MOSI, SPI_SSEL , and SPI_CLK (P5 through P9) as peripherals. If
you enable both ports then output goes to the UART until the first input on SPI.
XLR PRO Radio Frequency (RF) Module User Guide
Configuration considerations
36