Go Down

Topic: DUE baud rate of 1Mbps. (Read 311 times) previous topic - next topic

EJLED

Hi, i want to know that why DUE is not work at baudrate of 1000000. what should i do so that it can work at 1Mbps baudrate. should i change the clock frequency? if Yes then How to change the clock frequency?

it works upto 450000 baudrate. but my requirement if 1Mbps baudrate.

TIA

AdderD

What serial port are you trying to use for this? The Due is clocked at 84MHz and so should easily be able to achieve a 1Mbps baud rate. But, some serial ports are more configurable than others. I suppose you didn't even say serial. Could it be SPI or I2C? What are you referring to?

EJLED

I am using DUE Programming port. i do not know how to read data from SPI / I2C and to print it on Serial Window of arduino IDE software.

weird_dave

Have a look for UART_BRGR in the datasheet...
The Due can't achieve an exact 1M baud on any serial ports, the base frequency which has to be divided down is 84M/16 = 5.25MHz, this means 450K Baud is borderline (5.25M / 12 = 437.5K).

You might want to use the native port instead.

AdderD

It's not entirely true that none of the ports can do 1M exactly. The USART ports have an added set of bits that allow you to do true integer divisors. So, you could program a 1/84 divisor and get 1M. But, only some of the serial ports are USART and I do believe the programming port is on a UART not a USART so it can't do it.

I pretty much tell everyone just to use the native port. It is many times faster both for programming and serial and if you run into trouble there are physical erase and reset buttons.

weird_dave

Ah, thanks for correcting that, big oopsie on my part.

Go Up