XBee®/XBee‐PRO® ZB SMT RF Modules
The serial transmit buffer collects data that is received via the RF link that will be transmitted out the UART or
SPI port.
Internal Data Flow Diagram
Serial
Receiver
Buffer
RF TX
Buffer
Transmitter
DIN or MOSI
CTS
RF Switch
Antenna
Port
(If D7 is 1 and
UART is in use)
Processor
RF RX
Buffer
Serial Transmit
Buffer
DOUT or MISO
Receiver
T
RTS
(If UART is in
use, ignored un-
less D6 is 1)
Serial Receive Buffer
When serial data enters the RF module through the serial port, the data is stored in the serial receive buffer
until it can be processed. Under certain conditions, the module may receive data when the serial receive
buffer is already full. In that case the data is discarded.
The serial receive buffer becomes full when data is streaming into the serial port faster than it can be
processed and sent over the air (OTA). While the speed of receiving the data on the serial port can be
much faster than the speed of transmitting to data for a short period, sustained operation in that mode will
cause data to be dropped due to running out of places in the module to put the data. Some things that
may delay over the air transmissions are address discovery, route discovery, and retransmissions.
Processing received RF data can also take away time and resources for processing incoming serial data.
If the UART is the serial port and CTS flow control is enabled, the external data source is alerted when the
receive buffer is almost full. Then the host holds off sending data to the module until the module asserts
CTS again, allowing more data to come in.
If the SPI is the serial port, no hardware flow control is available. It is the user's responsibility to ensure
that 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 enough such that all data in a received RF packet won't fit in
the serial transmit buffer, the entire RF data packet is dropped.
Cases in which the serial transmit buffer may become full resulting in dropped RF packets:
1
If the RF data rate is set higher than the interface data rate of the module, the module could
receive data faster than it can send the data to the host.
2
If the host does not allow the module to transmit data out from the serial transmit buffer because
of being held off by hardware flow control.
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.
© 2010 Digi International, Inc.
27