...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
219
www.silabs.com
This can be done manually by assigning a GPIO to turn the driver on or off, or it can be handled
automatically by the USART. If AUTOCS in USARTn_CTRL is set, the USn_CS output is automatically
activated one baud period before the transmitter starts transmitting data, and deactivated when the last
bit has been transmitted and there is no more data in the transmit buffer to transmit, or the transmitter
becomes disabled. This feature can be used to turn the external driver on when transmitting data, and
turn it off when the data has been transmitted.
Figure 16.8 (p. 219) shows an example configuration where USn_CS is used to automatically enable
and disable an external driver.
Figure 16.8. USART Half Duplex Communication with External Driver
USART
RX
TX
µC
CS
The USn_CS output is active low by default, but its polarity can be changed with CSINV in
USARTn_CTRL. AUTOCS works regardless of which mode the USART is in, so this functionality can
also be used for automatic chip/slave select when in synchronous mode (e.g. SPI).
16.3.2.6.3 Two Data-links
Some limited devices only support half duplex communication even though two data links are available.
In this case software is responsible for making sure data is not transmitted when incoming data is
expected.
16.3.2.7 Large Frames
As each frame in the transmit and receive buffers holds a maximum of 9 bits, both the elements in the
buffers are combined when working with USART-frames of 10 or more data bits.
To transmit such a frame, at least two elements must be available in the transmit buffer. If only one
element is available, the USART will wait for the second element before transmitting the combined frame.
Both the elements making up the frame are consumed when transmitting such a frame.
When using large frames, the 9th bits in the buffers are unused. For an 11 bit frame, the 8 least significant
bits are thus taken from the first element in the buffer, and the 3 remaining bits are taken from the second
element as shown in Figure 16.9 (p. 220) . The first element in the transmit buffer, i.e. element 0 in
Figure 16.9 (p. 220) is the first element written to the FIFO, or the least significant byte when writing
two bytes at a time using USARTn_TXDOUBLE.
Summary of Contents for EFM32G
Page 505: ......