...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
229
www.silabs.com
If a write is attempted to the transmit buffer when it is not empty, the TXOF interrupt flag in LEUARTn_IF
is set, indicating the overflow. The data already in the buffer is in that case preserved, and no data is
written.
In addition to the interrupt flag TXC in LEUARTn_IF and the status flag TXC in LEUARTn_STATUS
which are set when the transmitter becomes idle, TXBL in LEUARTn_STATUS and the TXBL interrupt
flag in LEUARTn_IF are used to indicate the level of the transmit buffer. Whenever the transmit buffer
becomes empty, these flags are set high. Both the TXBL status flag and the TXBL interrupt flag are
cleared automatically when data is written to the transmit buffer.
The transmit buffer, including the TX shift register can be cleared by setting command bit CLEARTX in
LEUARTn_CMD. This will prevent the LEUART from transmitting the data in the buffer and shift register,
and will make them available for new data. Any frame currently being transmitted will not be aborted.
Transmission of this frame will be completed. An overview of the operation of the transmitter is shown
in Figure 16.3 (p. 229) .
Figure 16.3. LEUART Transmitter Overview
LEUn_TX
Transm it shift regist er
TXENS
d0- d8
cont rol
d0
d2
d4
d6
d8
d7
d5
d3
d1
cont rol
TXDATA
TXDATAX
BIT8DV
Transm it buffer
0
16.3.4.2 Frame Transmission Control
The transmission control bits, which can be written using LEUARTn_TXDATAX, affect the transmission
of the written frame. The following options are available:
• Generate break: By setting WBREAK, the output will be held low during the first stop-bit period to
generate a framing error. A receiver that supports break detection detects this state, allowing it to be
used e.g. for framing of larger data packets. The line is driven high for one baud period before the next
frame is transmitted so the next start condition can be identified correctly by the recipient. Continuous
breaks lasting longer than an UART frame are thus not supported by the LEUART. GPIO can be used
for this. Note that when AUTOTRI in LEUARTn_CTRL is used, the transmitter is not tristated before
the high-bit after the break has been transmitted.
• Disable transmitter after transmission: If TXDISAT is set, the transmitter is disabled after the frame
has been fully transmitted.
• Enable receiver after transmission: If RXENAT is set, the receiver is enabled after the frame has
been fully transmitted. It is enabled in time to detect a start-bit directly after the last stop-bit has been
transmitted.
The transmission control bits in the LEUART cannot tristate the transmitter. This is performed
automatically by hardware however, if AUTOTRI in LEUARTn_CTRL is set. See Section 16.3.7 (p. 234)
for more information on half duplex operation.
Summary of Contents for EFM32TG
Page 543: ......