This question already has an answer here:

I want to ask about using UART to send data from uC to PC. So I have some questions.

I wonder what is the maximum of the UART bit rate?

What factors affect the UART speed? For example does using DMA affect the bit rate?

Which Microcontrollers have the UART bit rate more than 30 Mbit/s? If many, like what?


marked as duplicate by Chris Stratton, Marcus Müller, uint128_t, PeterJ, Bence Kaulics Aug 14 '17 at 10:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    \$\begingroup\$ 1) Depends. 2) Many. 3) Many. Give us some more information about specifc details here. What medium are you using? Are you going to use standard ports? If so, which? \$\endgroup\$ – Joren Vaes Aug 13 '17 at 13:21
  • 1
    \$\begingroup\$ Your PC has UART bit rate more than 30 Mbit/s? \$\endgroup\$ – Bruce Abbott Aug 13 '17 at 14:02
  • 2
    \$\begingroup\$ If you can parallelize your data to bytes, look at something like the Cypress USB FIFO chips commonly used to make simple logic analyzers. \$\endgroup\$ – Chris Stratton Aug 13 '17 at 14:14
  • \$\begingroup\$ the A part in UART says: at 30 Mb/s, it's a bad idea to use UART. \$\endgroup\$ – Marcus Müller Aug 13 '17 at 14:36

There are several limitations on the UART baud rate in your setup:

  1. How fast the signals can switch. UART outputs are just ordinary digital signals. These could go quite fast on the same board, but aren't appropriate for high speed off-board in their native form.

  2. RS-232 converter chips. The microcontroller will put out ordinary digital signals, whereas a PC COM port requires RS-232 signal levels. Common converter chips usually have a upper speed limit in the 250 kBaud range. That doesn't mean you couldn't make your own circuit that goes faster, but you won't be able to just use a off the shelf chip.

  3. Baud rate chain on the micro. Most micros allow you to divide their internal clock by some integer, and the result will be 16x the baud rate. If you had a micro running at 30 MHz, for example, then the fastest baud rate would probably be 1.875 MBaud.

    Some micros have a "high speed" mode where a lower multiple than 16 is used. That gets you higher speed at the expense of robustness. This is uncommon at best, and often not a good idea anyway.

  4. The baud rates available in the PC. This is likely the most limiting criterion. The PC can only do the baud rates that are available to user code, based on what the UART hardware in the PC can do and policies encoded into the driver.

The bottom line is UART and PC COM ports are simply not meant for the speeds you want, not even close. If you try to exceed 115.2 kBaud, you are asking for trouble somewhere.

Find a better way to get data from a microcontroller to a PC.

That said, think about what this means on the micro end. You want to send or receive a new byte every 33 ns. Many microcontrollers can't even execute a single instruction in that time. Even on high end micros, that's only a few instructions at best. Think about what you have to do with that data or where the micro is supposed to get it from with maybe 3-5 instruction to handle each byte.

Your overall architecture seems inapropriate. You probably should be looking at using a FPGA, or find a better way to address the problem at the high level.


Which Microcontrollers have the UART bit rate more than 30 Mbit/s?

Probably none. UART is usually sampled at 16x or 8x the baud rate, so your micro would need a 240 or 480MHz clock source. Processors at that speed are rarely called microcontrollers.

Note that you probably don't want UART in the first place: You can get all sorts of negative HF effects unless your traces are extremely short between chips.


Not the answer you're looking for? Browse other questions tagged or ask your own question.