XBee‐PRO®900HP/XBee‐PRO®XSCRFModules
©2014DigiInternationalInc. 27
XBee-PRO 900HP Serial Buffers
To enable the UART port, DIN and DOUT must be configured as peripherals. To enable the SPI port, SPI_MISO,
SPI_MOSI, SPI_SSEL
, and SPI_CLK must be enabled as peripherals. If both ports are enabled then output will
go to the UART until the first input on SPI.
When both the UART and SPI ports are enabled on power-up, all serial data will go out the UART. But, as soon
as input occurs on either port, that port is selected as the active port and no input or output will be allowed on
the other port until the next reset of the module.
If the configuration is changed so that only one port is configured, then that port will be the only one enabled
or used. If the parameters are written with only one port enabled, then the port that is not enabled will not
even be used temporarily after the next reset.
If both ports are disabled on reset, the UART will be used in spite of the wrong configuration so that at least
one serial port will be operational.
Serial Receive Buffer
When serial data enters the RF module through the DIN Pin (or the MOSI pin), the data is stored in the
serial receive buffer until it can be processed. Under certain conditions, the module may not be able to
process data in the serial receive buffer immediately. If large amounts of serial data are sent to the module
such that the serial receive buffer would overflow, then the new data will be discarded. If the UART is in
use, this can be avoided by the host side honoring CTS flow control.
If the SPI is the serial port, no hardware flow control is available. It is the user's responsibility to ensure
that receive buffer is not overflowed. One reliable strategy is to wait for a TX_STATUS response after each
frame sent to ensure that the module has had time to process it.
Serial Transmit Buffer
When RF data is received, the data is moved into the serial transmit buffer and sent out the UART or SPI
port. If the serial transmit buffer becomes full and system buffers are also full, then the entire RF data
packet is dropped. Whenever data is received faster than it can be processed and transmitted out the serial
port, there is a potential of dropping data.
XBee-PRO 900HP UART Flow Control
The RTS and CTS module pins can be used to provide RTS and/or CTS flow control. CTS flow control provides
an indication to the host to stop sending serial data to the module. RTS flow control allows the host to signal
the module to not send data in the serial transmit buffer out the UART. RTS and CTS flow control are enabled
using the D6 and D7 commands. Please note that serial port flow control is not possible when using the SPI
port.
CTS Flow Control
If CTS flow control is enabled (D7 command), when the serial receive buffer is 17 bytes away from being
full, the module de-asserts CTS
(sets it high) to signal to the host device to stop sending serial data. CTS is
re-asserted after the serial receive buffer has 34 bytes of space. See FT for the buffer size.
RTS Flow Control
If RTS flow control is enabled (D6 command), data in the serial transmit buffer will not be sent out the
DOUT pin as long as RTS
is de-asserted (set high). The host device should not de-assert RTS for long
periods of time to avoid filling the serial transmit buffer. If an RF data packet is received, and the serial
transmit buffer does not have enough space for all of the data bytes, the entire RF data packet will be
discarded.
The UART Data Present Indicator is a useful feature when using RTS flow control. When enabled, the DIO1
line asserts (low asserted) when UART data is queued to be transmitted from the module. See the D1 com-
mand in the Command Reference Tables for more information.
Note: If the XBee is sending data out the UART when RTS
is de-asserted (set high), the XBee could send
up to 5 characters out the UART or SPI port after RTS
is de-asserted.