Spi And Api Mode; Full Duplex Operation; Slave Mode Characteristics - Digi DigiMesh XBee S2C User Manual

Radio frequency (rf) modules
Hide thumbs Also See for DigiMesh XBee S2C:
Table of Contents

Advertisement

Serial communication

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.

Full duplex operation

When using SPI on the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module the device uses API operation
without escaped characters to packetize data. The device ignores the configuration of AP because SPI
does not operate in any other mode. 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
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.

Slave mode characteristics

In slave mode, the following apply:
SPI Clock rates up to 5 MHz (5 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.
XBee S2C DigiMesh 2.4 User Guide
SPI port
42

Advertisement

Table of Contents
loading

Table of Contents