20.3.3 Flow Control
The UART provides hardware flow control via the CTS and RTS pins. CTS and RTS may be individually enabled using the crossbar,
may be operated independently of one another, and are active only when enabled through the crossbar.
The CTS pin is an input to the device. When CTS is held high, the UART will finish any byte transfer that is currently in progress, and
then will halt before sending any more data. CTS must be returned low before data transfer will continue.
The RTS pin is an output from the device. When the receive buffer is full, RTS will toggle high. When data has been read from the
buffer and there is additional room available, RTS will be cleared low.
20.3.4 Basic Data Transfer
UART1 provides standard asynchronous, full duplex communication. All data sent or received goes through the SBUF1 register, and
(when an extra bit is enabled) the RBX bit in the SCON1 register.
Transmitting Data
Data transmission is initiated when software writes a data byte to the SBUF1 register. If XBE is set (extra bit enable), software should
set up the desired extra bit in TBX prior to writing SBUF1. Data is transmitted LSB first from the TX pin. The TI flag in SCON1 is set at
the end of the transmission (at the beginning of the stop-bit time). If TI interrupts are enabled, TI will trigger an interrupt.
Receiving Data
To enable data reception, firmware should write the REN bit to 1. Data reception begins when a start condition is recognized on the RX
pin. Data will be received at the selected baud rate through the end of the data phase. Data will be transferred into the receive buffer
under the following conditions:
• There is room in the receive buffer for the data.
• MCE is set to 1 and the stop bit is also 1 (XBE = 0).
• MCE is set to 1 and the extra bit is also 1 (XBE = 1).
• MCE is 0 (stop or extra bit will be ignored).
In the event that there is not room in the receive buffer for the data, the most recently received data will be lost. The RI flag will be set
any time that valid data has been pushed into the receive buffer. If RI interrupts are enabled, RI will trigger an interrupt. Firmware may
read the 8 LSBs of received data by reading the SBUF1 register. The RBX bit in SCON1 will represent the extra received bit or the stop
bit, depending on whether XBE is enabled. If the extra bit is enabled, it should be read prior to reading SBUF1.
20.3.5 Data Transfer With FIFO
UART1 includes receive and transmit buffers to reduce the amount of overhead required for system interrupts. In applications requiring
higher baud rates, the FIFOs may also be used to allow for additional latency when servicing interrupts. The transmit FIFO may be pre-
loaded with additional bytes to maximize the outgoing throughput, while the receive FIFO allows the UART to continue receiving addi-
tional bytes of data between firmware reads. Configurable thresholds may be set by firmware to dictate when interrupts will be gener-
ated, and a receive timeout feature keeps received data from being orphaned in the receive buffer.
Both the receive and transmit FIFOs are configured using the UART1FCN0 and UART1FCN1 registers, and the number of bytes in the
FIFOs may be determined at any time by reading UART1FCT.
EFM8UB3 Reference Manual
Universal Asynchronous Receiver/Transmitter 1 (UART1)
silabs.com
| Building a more connected world.
Rev. 0.2 | 294