SPI operation
SPI communications
The XBee Smart Modem supports SPI communications in slave mode. Slave mode receives the clock
signal and data from the master and returns data to the master. The following table shows the
signals that the SPI port uses on the device.
Signal
SPI_MOSI
(Master Out, Slave In)
SPI_MISO (Master
In, Slave Out)
SPI_SCLK (Serial Clock) Clocks data transfers on MOSI and MISO
SPI_SSEL (Slave Select) Enables serial communication with the slave
SPI_ATTN (Attention)
In this mode:
SPI clock rates up to 4.8 MHz are possible.
n
Data is most significant bit (MSB) first; bit 7 is the first bit of a byte sent over the interface.
n
Frame Format mode 0 is used. This means CPOL= 0 (idle clock is low) and CPHA = 0 (data is
n
sampled on the clock's leading edge).
The SPI port only supports API Mode (AP = 1).
n
The following diagram shows the frame format mode 0 for SPI communications.
SPI mode is chip to chip communication. We do not supply a SPI communication option on the device
development evaluation boards.
Full duplex operation
The specification for SPI includes the four signals SPI_MISO, SPI_MOSI, SPI_CLK, and SPI_SSEL. Using
these four signals, the SPI master cannot know when the slave needs to send and the SPI slave
cannot transmit unless enabled by the master. For this reason, the SPI_ATTN signal is available in the
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
Function
Inputs serial data from the master
Outputs serial data to the master
Alerts the master that slave has data queued to send. The XBee Smart
Modem 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.
SPI communications
150