RPI_333333
Posts: 20
Joined: Wed Nov 14, 2018 8:53 am

RPI 3 UART max speed

Wed Nov 14, 2018 9:06 am

Hi,
I saw many posts on this issue but still don't have a clear answer.
I would like to use the UART on the Pi3 at the highest rate possible but still make sure the transmission is fully realiable.
I haven't managed to find a clear answer: what is the maximum UART rate for realiable transmission ?

I would also like to know:
1. What is the UART driver on the RPI 3 , is it PrimeCell® UART (PL011) (How can i confirm that this is the exact component)?

2.What are the driver capabilities, what is the maximum baud rate?
Acorrding to the reference manual secion 2.1:

supports the following maximum baud rates:
— 921600 bps, in UART mode
— 460800 bps, in IrDA mode
— 115200 bps, in low-power IrDA mode.

LInk to the document:
http://infocenter.arm.com/help/topic/c ... p5_trm.pdf

3. I saw that many people mentioned that they manged to activate the UART at much higher rates than the manual, how can it be?

Thanks for the help!

HiassofT
Posts: 221
Joined: Fri Jun 30, 2017 10:07 pm
Location: Salzburg, Austria
Contact: Website

Re: RPI 3 UART max speed

Wed Nov 14, 2018 1:03 pm

The RPi has 2 UARTs, a PL011 and a "mini UART". In general it's best to use the PL011.

The PL011 uses the ~48MHz uart clock as a base, which results in a maximum achievable baudrate of 3Mbit/sec (48MHz/16).

I recently did some tests and transmitting data at 3mbit/sec looked fine on the scope. I haven't done any receive tests but I guess with RTS/CTS handshaking enabled (the PL011 and the driver seem to support auto hardware RTS/CTS handshaking) that should work fine.

The miniuart is a bit of an odd beast, it uses the ~250MHz VPU clock as a base so maximum baudrate would be about 31.25 Mbit/sec. But the actual baudrate seems to be a bit lower than requested - even at lower speeds like 115kbit/sec. Not sure what's exactly going on there, actual speeds seemed to be within acceptable (+/- 3%) limits though.

so long,

Hias

RPI_333333
Posts: 20
Joined: Wed Nov 14, 2018 8:53 am

Re: RPI 3 UART max speed

Wed Nov 14, 2018 1:35 pm

HiassofT wrote:
Wed Nov 14, 2018 1:03 pm
The RPi has 2 UARTs, a PL011 and a "mini UART". In general it's best to use the PL011.

The PL011 uses the ~48MHz uart clock as a base, which results in a maximum achievable baudrate of 3Mbit/sec (48MHz/16).

I recently did some tests and transmitting data at 3mbit/sec looked fine on the scope. I haven't done any receive tests but I guess with RTS/CTS handshaking enabled (the PL011 and the driver seem to support auto hardware RTS/CTS handshaking) that should work fine.

The miniuart is a bit of an odd beast, it uses the ~250MHz VPU clock as a base so maximum baudrate would be about 31.25 Mbit/sec. But the actual baudrate seems to be a bit lower than requested - even at lower speeds like 115kbit/sec. Not sure what's exactly going on there, actual speeds seemed to be within acceptable (+/- 3%) limits though.

so long,

Hias
Thanks for the answer.
If the PL011 UART can go up to 3Mbit/sec why the PL011 spec mentioned 921600 bps ? what am i missing?

User avatar
bensimmo
Posts: 4184
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: RPI 3 UART max speed

Wed Nov 14, 2018 1:57 pm

Just adding a link to the UART documents for anyone else reading.
https://www.raspberrypi.org/documentati ... on/uart.md or for the RPI_333333 if not found already.

RPI_333333
Posts: 20
Joined: Wed Nov 14, 2018 8:53 am

Re: RPI 3 UART max speed

Thu Nov 15, 2018 6:12 am

Thanks you all for the answer,
I still don't understand:
If the PL011 UART can go up to 3Mbit/sec why the PL011 spec mentioned 921600 bps ? what am i missing?

Return to “Interfacing (DSI, CSI, I2C, etc.)”