Serial communication Flow control
Digi XBee3® 802.15.4 RF Module User Guide
34
For serial communication to occur, you must configure the UART of both devices (the microcontroller
and the XBee3 802.15.4 RF Module) with compatible settings for the baud rate, parity, start bits, stop
bits, and data bits.
Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high).
The following diagram illustrates the serial bit pattern of data passing through the device. The
diagram shows UART data packet 0x1F (decimal number 31) as transmitted through the device.
You can configure the UART baud rate, parity, and stop bits settings on the device with the BD, NB,
and SB commands respectively. For more information, see UART interface commands.
Flow control
The XBee3 802.15.4 RF Module maintains buffers to collect serial and RF data that it receives. The
serial receive buffer collects incoming serial characters and holds them until the device can process
them. The serial transmit buffer collects the data it receives via the RF link until it transmits that data
out the serial port. The following figure shows the process of device buffers collecting received serial
data.
Use D6 command and D7 command to set flow control.
Clear-to-send (CTS) flow control
If you enable CTS flow control (D7 command), when the serial receive buffer is more than FT bytes 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 less than FT bytes in it. See FT command to
configure and read this threshold.