Configuration Considerations; Serial Port Selection; Data Format; Spi Parameters - Digi XBee SX 868 User Manual

Radio frequency (rf) module
Hide thumbs Also See for XBee SX 868:
Table of Contents

Advertisement

Operation
It has the disadvantage of putting the device to sleep whenever the SPI master negates SPI_SSEL
(meaning time is lost waiting for the device to wake), even if that was not the intent.
If the user has full control of SPI_SSEL so that it can control pin sleep, whether or not data needs to be
transmitted, then sharing the pin may be a good option in order to make the SLEEP_REQUEST pin
available for another purpose.
If the device is one of multiple slaves on the SPI, then the device sleeps while the SPI master talks to
the other slave, but this is acceptable in most cases.
If you do not configure either pin as a peripheral, then the device stays awake, being unable to sleep in
SM1 mode.

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

Serial port selection

In the default configuration both the UART and SPI ports are configured for serial port operation. In
this case, serial data goes out the UART until the host device asserts the SPI_SSEL signal. Thereafter
all serial communications operate only on the SPI interface until a reset occurs.
If you enable only the UART, the XBee SX 868 RF Module uses only the UART, and ignores the SPI_
SSEL.
If you enable only the SPI, the XBee SX 868 RF Module uses only the SPI, and ignores UART
communications.

Data format

The SPI only operates in API mode 1. The device does not support Transparent mode or API mode 2
(which escapes control characters). This means that the AP configuration only applies to the UART,
and the device ignores it while using SPI.

SPI parameters

Most host processors with SPI hardware allow you to set the bit order, clock phase and polarity. For
communication with all XBee SX 868 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 XBee SX 868 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.
XBee® SX 868 RF Module User Guide
Configuration considerations
36

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents