Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual page 620

Table of Contents

Advertisement

19.3.4.1 Transmit Buffer Operation
A frame can be loaded into the transmit buffer by writing to LEUARTn_TXDATA or LEUARTn_TXDATAX. Using LEUARTn_TXDATA
allows 8 bits to be written to the buffer. If 9 bit frames are used, the 9th bit will in that case be set to the value of BIT8DV in
LEUARTn_CTRL. To set the 9th bit directly and/or use transmission control, LEUARTn_TXDATAX must be used. When writing data to
the transmit buffer using LEUARTn_TXDATAX, the 9th bit written to LEUARTn_TXDATAX overrides the value in BIT8DV, and alone
defines the 9th bit that is transmitted if 9-bit frames are used.
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.
There is also TXIDLE status in LEUART_STATUS which can be used to detect when the transmit state machine is in the idle state.
The transmit buffer, including the TX shift register can be cleared by setting command bit CLEARTX in LEUARTn_CMD. This will pre-
vent the LEUART from transmitting the data in the buffer and shift register, and will make them available for new data. Any frame cur-
rently 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 19.5 LEUART Transmitter Overview on page
TXENS
LEUn_TX
19.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 follow-
ing options are available:
• Generate break: By setting TXBREAK, the output will be held low during the first stop-bit period to generate a framing error. A re-
ceiver 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 bit 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 if AUTOTRI in
LEUARTn_CTRL is set. See
silabs.com | Building a more connected world.
Transmit shift register
d0-d8
control
Figure 19.5. LEUART Transmitter Overview
19.3.7 Half Duplex Communication
LEUART - Low Energy Universal Asynchronous Receiver/Transmitter
620.
TXDATA
d0
d1
d2
d3
d4
d5
TXDATAX
for more information on half duplex operation.
BIT8DV
0
d6
d7
d8
control
Transmit buffer
Reference Manual
Rev. 1.1 | 620

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?

Table of Contents