logo elektroda
logo elektroda
X
logo elektroda

USART vs. UART - what are the differences?

ghost666 15579 15

TL;DR

  • UART and USART are microcontroller peripherals for serial byte-to-bit conversion, but USART adds synchronous operation while UART is strictly asynchronous.
  • UART uses an internal clock and start-bit synchronization, so receivers must already know the baud rate.
  • USART can output an external clock, or use a separate clock line, and the article cites speeds up to 4 Mbps.
  • USART supports more protocols, including IrDA, LIN, Smart Card, RS-485 driver-enable, and Modbus, while also handling standard asynchronous UART framing.
  • In STM32 low-power designs, USART handles higher-complexity, higher-power transfers, while UART is favored for lower-speed communication and lower power consumption.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Have you ever used the term UART only to be corrected by another engineer that it is not a UART but a USART? In some cases the two terms are interchangeable, but in many others it is incorrect to use them interchangeably. Let's take a look at what exactly USART and UART are, and what are the main differences between them.

    Most embedded engineers are familiar with the UART interface: universal asynchronous receiver / transmitter. It is a microcontroller peripheral that converts incoming and outgoing data bytes to a serial stream. A start bit starts a serial stream and a stop bit or two ends a data word (frame). The UART also has the ability to add a parity bit to the frame to help detect if an error has occurred during transmission. Picture 1 shows a standard example of a frame that can be seen by viewing data transmitted over the UART.


    USART vs. UART - what are the differences?
    Fig. 1. Data frame in the UART interface.


    USART, on the other hand, is a universal synchronous / asynchronous receiver / transmitter. It is a microcontroller peripheral that converts incoming and outgoing data bytes into a serial bitstream ... The definition of USART is identical to the definition of UART, but in short there is an additional word - "synchronous". So there must be some differences, otherwise USART would be the same as UART and no one would have to correct anyone.

    Indeed, the differences are, and it is important. Let's look at them one by one.

    The first difference between USART and UART is how serial data can be clocked. The UART generates its own data clock internally in the microcontroller and synchronizes it with the data stream detecting the initial transition - the start bit. There is no incoming data related clock signal here, so in order to properly receive a data stream the receiver needs to know in advance what the baud rate should be.

    On the other hand, USART can be configured to work in synchronous mode. In this mode, the peripheral device sends the clock signal to the outside, and the receiving peripheral device can retrieve it from the data stream without knowing the data rate in advance. Alternatively, some links may even use a separate clock line to clock the entire transmission. The use of an external clock allows for a much higher data transmission speed using the USART interface than the standard UART - this type of transmission reaches speeds of up to 4 Mbps.

    The second important difference between USART and UART interfaces is the number of protocols supported by a peripheral device. UART is simple and offers only a few options for the basic data format. You can configure the number of stop bits and the occurrence and method of computing the parity bit of the frame. USART is much more complex and can generate data in a form suitable for many different protocols such as IrDA, LIN, Smart Card and Driver Enable for interfaces such as RS-485 and Modbus. This list, of course, does not exhaust the full capabilities of the USART interface. Additionally, it also has the same capabilities for realizing asynchronous transmission as UART, i.e.USART can generate the same type of serial data as shown in Figure 1 .

    USART and UART peripherals have definitely different possibilities and can be used in different situations, so in typical microcontrollers both of these interfaces are present so that the developer, when creating his system, can choose the one that best suits a given task. Take, for example, a system whose purpose is to run on low power. The device is to be based on the STM32 family. STM32 microcontrollers contain both USART and UART. USART is designed to implement serial communication with high requirements, especially since it consumes more energy. It can be activated when it is necessary to transfer large amounts of data or to run a complex protocol. On the other hand, when the microcontroller is asleep - in a low-power mode - the UART peripheral can handle low-speed communication while offering lower power consumption by the system.

    So are USART and UART the same? Technically, the answer is: not . USART generally has more capabilities than a standard UART module, as well as the ability to generate clocked data, allowing USART to run at speeds well in excess of UART's capabilities. USART covers the capabilities of the UART, however, in many applications, despite the high parameters of the USART module, programmers use them as simple UARTs, ignoring or avoiding synchronous clock generation in these powerful peripherals. No wonder so many people use these terms as if they were synonyms ...

    Source: https://www.edn.com/electronics-blogs/embedde...cs/4440395/USART-vs-UART--Know-the-difference

    Cool? Ranking DIY
    About Author
    ghost666
    Translator, editor
    Offline 
    ghost666 wrote 11961 posts with rating 10258, helped 157 times. Live in city Warszawa. Been with us since 2003 year.
  • ADVERTISEMENT
  • #2 18281512
    TechEkspert
    Editor
    Is RS-485 a USART?
  • ADVERTISEMENT
  • #3 18281661
    gregrzesiek
    Level 14  
    TechEkspert wrote:
    Is RS-485 a USART?

    RS485 is not the same as USART, but they can be related :)
    USART / UART - receiver / transmitter for serial data transmission. Here, the bit sequence, speed, data transmission format etc. are defined
    RS485 - defines the transmission from the electric side, voltage levels, differential transmission etc.

    Having the USART / UART interface, we can convert it to RS485 using an appropriate transceiver. Then the data format will be the same as in USART / UART, and the electrical levels as in RS485.
  • #4 18281667
    TechEkspert
    Editor
    However, it is quite tangled, i.e. both UART and USART can drive RS485?

    The only strong differentiator for me between USART and UART is the clock line between the devices.
  • #5 18281703
    gregrzesiek
    Level 14  
    TechEkspert wrote:
    However, it is quite tangled, i.e. both UART and USART can drive RS485?

    The only strong differentiator for me between USART and UART is the clock line between the devices.


    Yes, UART and USART can be connected to the RS485 transceiver.
    RS485 operates on one differential pair, so in this case no additional clock line is used. More important is that in UART the receiving device must know the speed at which it should receive data, e.g. in both devices (transmitter and receiver) we set the speed to e.g. 9600 baud. In the case of USART, the receiver is able to determine the baud rate from the received data.
  • #6 18281737
    TechEkspert
    Editor
    USART when:
    - the clock is passed on a separate line
    or
    - the device recovers the clock frequency from the transmitted data

    UART when:
    - the clock frequency is predefined and the clock is synchronized with the transmitted data
  • ADVERTISEMENT
  • #7 18281799
    tmf
    VIP Meritorious for electroda.pl
    gregrzesiek wrote:
    More important is that in UART the receiving device must know the speed at which it should receive data, e.g. in both devices (transmitter and receiver) we set the speed to e.g. 9600 baud.

    Yes and no. By using asynchronous transmission, the receiver (some implementations even do it in hardware) has the ability to adapt the reception speed to the transmitter. In turn, using e.g. Manchaster coding in one transmission we have both clock and data.
    IMHO there is only one difference between UART and USART - UART supports transmission without an additional clock line, and USART allows the use of an additional clock line.
    ghost666 wrote:
    The use of an external clock allows for a much higher data transmission speed using the USART interface than the standard UART - this type of transmission reaches speeds of up to 4 Mbps.

    Technically, yes, and in practice, in many MCUs, the maximum baud rate for both modes is the same.
    ghost666 wrote:
    USART is much more complex and can generate data in a form suitable for many different protocols such as IrDA, LIN, Smart Card and Driver Enable for interfaces such as RS-485 and Modbus.

    Not necessarily. These additional functions depend entirely on the manufacturer's implementation. I would even risk saying that these additional protocols are an add-on not related to UART / USART, but only in many implementations using the UART / USART register set as they are similar serial protocols.
  • #8 18281847
    TechEkspert
    Editor
    The differential code manchaster is an interesting case, not only does it take care of a similar number of "0" and "1" in transmission, but also we have the clock synchronization of the receiver with the transmitter through the stream of information sent by the transmitter.
  • #9 18282571
    Marek_Skalski
    VIP Meritorious for electroda.pl
    ghost666 wrote:
    STM32 microcontrollers contain both USART and UART. USART ... It can be activated when it is necessary to transfer large amounts of data or to run a complex protocol. Conversely, when the microcontroller is asleep - in a low-power mode - the UART peripheral can handle low-speed communication while offering lower power consumption by the system.

    Sleep is just a halt to the core. Exactly for such applications as above, LPUART is dedicated, which consumes at least 2x less power and can operate in true energy saving modes. Another feature of LPUART is the ability to wake up the system in response to data sent from any level of the STOP mode. This is so as a supplement to the information, since we are already referring to a specific group of products.
  • ADVERTISEMENT
  • #10 18282757
    krisRaba
    Level 31  
    LPUART is only in the L series? Do others also?
  • #11 18283097
    Sareph
    Level 24  
    krisRaba wrote:
    LPUART is only in the L series? Do others also?
    In others as well.
  • #12 18283178
    krisRaba
    Level 31  
    Interesting, I haven't found it so far. I will check in my free time to see if I just missed it or if the one I used was not there.
  • #13 18283903
    Sareph
    Level 24  
    They are in G0, G4, H7, L0, L4, L5, L6, WB55.
  • #14 18284444
    krisRaba
    Level 31  
    And here you have, I didn't use these at the time :-) But soon there will be H7 in the project, so I will read a bit about news :-)
  • #15 18285273
    osctest1
    Level 21  
    krisRaba wrote:
    it is supposed to be H7, so I will read a bit about news
    A lot of news :) . An interesting fact is that stlinkgdbserver can not get along with nini. OpenOCD and jlinkgdbserver absolutely
  • #16 18285777
    krisRaba
    Level 31  
    It's good to know in advance so that you don't tear your hair out later ;-)
📢 Listen (AI):

Topic summary

✨ USART (Universal Synchronous/Asynchronous Receiver/Transmitter) and UART (Universal Asynchronous Receiver/Transmitter) are both serial communication interfaces used in embedded systems, but they have distinct differences. UART operates without a clock line, relying on predefined baud rates for data transmission, while USART can utilize a separate clock line or recover the clock frequency from the transmitted data. This allows USART to adapt to varying transmission speeds, making it more versatile in certain applications. Both interfaces can be connected to RS-485 transceivers, but RS-485 focuses on electrical characteristics rather than data format. Additionally, LPUART (Low Power UART) is mentioned as a power-efficient alternative for specific applications, available in various microcontroller series.
Generated by the language model.

FAQ

TL;DR: 75 % of STM32 families (G0, G4, H7, L0, L4, L5, L6, WB55) pack both UART and USART blocks, "the only strong differentiator … is the clock line" [TechEkspert, #18281667]. Synchronous USART reaches 4 Mbps—10× classic 115 200 bps UART [EDN].

Why it matters: Picking the right peripheral avoids needless power drain, wiring and debug time.

Quick Facts

• Max synchronous USART speed: 4 Mbps [EDN]. • Common UART baud presets: 9 600–921 600 bps [Typical MCU datasheets]. • STM32 LPUART current: ≈100 µA in Stop mode—≤½ regular UART [ST AN4750]. • RS-485 transceivers tolerate ±7 V bus fault (TIA-485-A). • UART frame: 1 start, 5-9 data, optional parity, 1-2 stop bits [ghost666, #18281469].

What is the core difference between UART and USART?

UART works asynchronously and relies on preset baud rates. USART can switch to synchronous mode and share or embed a clock, so the receiver derives timing automatically [ghost666, #18281469][TechEkspert, #18281737].

Can both UART and USART drive an RS-485 bus?

Yes. Attach either peripheral to an external RS-485 transceiver. The serial format stays UART-style; the transceiver only converts voltage levels [gregrzesiek, #18281661].

Is RS-485 itself a USART?

No. RS-485 is an electrical layer (differential ±1.5 V signalling). It defines voltages, not framing or clocks [gregrzesiek, #18281661].

Does synchronous USART always run faster than UART?

Not always. Hardware limits can equalise top speeds; some MCUs cap both modes at the same clock divider [tmf, #18281799].

How fast can asynchronous UART practically run?

Many 32-bit MCUs sustain 921 600 bps; beyond 2 Mbps framing errors grow because 3 % clock mismatch causes loss of sync ("edge-case failure") [Typical MCU datasheets].

Which STM32 lines include low-power LPUART?

G0, G4, H7, L0, L4, L5, L6 and WB55 families feature LPUART blocks [Sareph, #18283903].

Why use LPUART instead of standard UART?

LPUART draws ≈100 µA in Stop mode, wakes the CPU on any start bit and halves energy versus normal UART [ST AN4750][Marek_Skalski, #18282571].

Can UART auto-detect baud rate?

Some chips offer hardware autobaud that measures start-bit width and adjusts dividers, though still without a shared clock [tmf, #18281799].

What extra protocols can a modern USART emulate?

Vendors may add IrDA, LIN, Smart-Card, or RS-485 driver-enable timing, but these are optional extensions, not part of the USART spec [tmf, #18281799].

What happens if two UART devices use different parity settings?

The receiver flags a parity error for every mismatched frame and higher-layer protocol must request retransmission.

3-step: How to convert MCU USART to an RS-485 network?

  1. Configure USART for desired frame (8N1, optional DE pin).
  2. Connect TX/RX (and DE) to an RS-485 transceiver (e.g., MAX3485).
  3. Terminate the differential pair with 120 Ω at each end and verify half-duplex direction control.

Quotation recap?

"The only strong differentiator for me between USART and UART is the clock line" [TechEkspert, #18281667].
Generated by the language model.
ADVERTISEMENT