Go Down

Topic: Arduino due max baud rate 1000000 is it working (Read 2575 times) previous topic - next topic



I want to get the maximum baud rate out of an arduino due.I used Serial.begin(1000000) and put an LED to blink when I send a serial character out.The LED blinks faster at 1000000 and so I know that it is working but on the PC end the serial library I am using in my C code cant set the baud rate to 1000000.I get garbage. Is there a library or software which would allow to set and use baud rates at higher than 115200. I used Hyper serial port but it also reads just garbage values at 926100 on the PC.

I want a permanent and proper solution as this problem has been discussed many time but a concrete solution here would also help others.


I used Hyper serial port but it also reads just garbage values at 926100 on the PC.
How do you know your due is not sending garbage?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


I changed the baud to 115200 and it works fine.I used teraterm at 921600 baud after setting the baud in the arduino due code but still I get garbage.
Code: [Select]
void setup() {
  // put your setup code here, to run once:


void loop() {
  // put your main code here, to run repeatedly:




So I read in another thread here as to how to set the Mega at 1000000 baud. It uses this line
bitSet(UCSR0A, U2X0);
and it worked for me. Is there a similar command on the Due as well? Please let me know.


I read this in the data sheet
Baud Rate Generator
The baud rate generator provides the bit period clock named baud rate clock to both the receiver and the
The baud rate clock is the master clock divided by 16 times the value (CD) written in UART_BRGR (Baud Rate
Generator Register). If UART_BRGR is set to 0, the baud rate clock is disabled and the UART remains inactive.
The maximum allowable baud rate is Master Clock divided by 16. The minimum allowable baud rate is Master
Clock divided by (16 x 65536).

So for a baudrate of 2000000, CD = (84000000)/(16*2000000) = 2.65. Now how do I write this value into the register UART_BRGR? Could some one tell me how to?


Jun 10, 2015, 07:53 am Last Edit: Jun 10, 2015, 08:01 am by youthreewire
I found this on how to set the register.
Code: [Select]
// Set the baudrate to 115200
    UART->UART_BRGR = 45; // 84000000 / 16 * x = BaudRate (write x into UART_BRGR)

But for a baudrate value of 115200 the value x i.e UART_BRGR comes out to be 45. It works but for a baud rate of 1000000 the value of UART_BRGR comes to 5.25. So I used 5 as the value of X i.e UART_BRGR and calculated the baudrate which is 1050000 but now when I set this baudrate I get garbage. What am I doing wrong here?


Has anyone been able to solve this?

e.g. What is the maximal possible baud rate of a Due with the Programming Port?


I thought there was a 115200 limitation in windows.

Go Up