Serial communication CTS flow control
Digi XBee® 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
149
CTS flow control
We strongly encourage you to use flow control with the XBee Smart Modem to prevent buffer
overruns.
CTS flow control is enabled by default; you can disable it with D7 (DIO7/CTS). When the serial receive
buffer fills with the number of bytes specified by FT (Flow Control Threshold), the device de-asserts
CTS (sets it high) to signal the host device to stop sending serial data. The device re-asserts CTS when
less than FT-32 bytes are in the UART receive buffer.
Note Serial flow control is not possible when using the SPI port.
RTS flow control
If you set D6 (DIO6/RTS) to enable RTS flow control, the device does not send data in the serial
transmit buffer out the DOUT pin as long as RTS is de-asserted (set high). Do not de-assert RTS for
long periods of time or the serial transmit buffer will fill.
Enable UART or SPI ports
To enable the UART port, configure DIN and DOUT (P3 and P4 parameters) as peripherals. To enable
the SPI port, enable SPI_MISO, SPI_MOSI, SPI_SSEL , and SPI_CLK (P5 through P9) as peripherals. If
you enable both ports then output goes to the UART until the first input on SPI.
When both the UART and SPI ports are enabled on power-up, all serial data goes out the UART. As
soon as input occurs on either port, that port is selected as the active port and no input or output is
allowed on the other port until the next device reset.
If you change the configuration so that only one port is configured, then that port is the only one
enabled or used. If the parameters are written with only one port enabled, then the port that is not
enabled is not used even temporarily after the next reset.
If both ports are disabled on reset, the device uses the UART in spite of the wrong configuration so
that at least one serial port is operational.