Serial Receive Buffer; Serial Transmit Buffer; Uart Flow Control; Cts Flow Control - Digi XBee-PRO S2C Zigbee User Manual

Rf module
Hide thumbs Also See for XBee-PRO S2C Zigbee:
Table of Contents

Advertisement

Operation

Serial receive buffer

When serial data enters the XBee/XBee-PRO Zigbee RF Module through the serial port, the device
stores the data in the serial receive buffer until it can be processed. Under certain conditions, the
device may receive data when the serial receive buffer is already full. In that case, the device discards
the data.
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 data for a short period, sustained operation in that mode
causes the device to drop data due to running out of places 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 you enable the CTS flow control, the device alerts the external data
source when the receive buffer is almost full. The host delays sending data to the device 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 your responsibility to ensure
that the receive buffer does not overflow. One reliable strategy is to wait for a TX_STATUS response
after each frame sent to ensure that the device has had time to process it.

Serial transmit buffer

When the device receives RF data, it moves the data into the serial transmit buffer and sends it out
the UART or SPI port. If the serial transmit buffer becomes full and the system buffers are also full,
then it drops the entire RF data packet. Whenever the device receives data faster than it can process
and transmit the data out the serial port, there is a potential of dropping data.
In situations where 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 device, the device may
receive data faster than it can send the data to the host. Even occasional transmissions from a
large number of devices can quickly accumulate and overflow the transmit buffer.
2. If the host does not allow the device to transmit data out from the serial transmit buffer due to
being held off by hardware flow control.

UART flow control

You can use the RTS and CTS pins to provide RTS and/or CTS flow control. CTS flow control provides an
indication to the host to stop sending serial data to the device. RTS flow control allows the host to
signal the device to not send data in the serial transmit buffer out the UART. To enable RTS/CTS flow
control, use the D6 and D7 commands.
Note
Serial port flow control is not possible when using the SPI port.

CTS flow control

If you enable CTS flow control (D7 command), when the serial receive buffer is 17 bytes away from
being full, the device de-asserts CTS (sets it high) to signal to the host device to stop sending serial
data. The device reasserts CTS after the serial receive buffer has 34 bytes of space.
In either case, CTS is not re-asserted until the serial receive buffer has FT-17 or less bytes in use.
XBee/XBee-PRO® S2C Zigbee® RF Module
UART flow control
42

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee s2c zigbee

Table of Contents