cancel
Showing results for 
Search instead for 
Did you mean: 

UART baud rate

matic
Associate III
Posted on June 13, 2016 at 18:50

Hi.

I communicate between two F303 parts over UART. Both modules are clocked with 72 MHz. USART1 on one part is on APB2, which runs at 72 MHz. On the other part, USART2 is used, which is on APB1 (36 MHz). But USART2 is configured to run on SYSCLK at 72 MHz, too.

Now, my question is, what maximum baud rate could I expect? With 3 Mbits/s it works. With 3.5 Mbits/s, the communication is not always correct and with 4 Mbits/s it is never correct.

I have 1m long cable between these two PCBs, connection is RS-422 type.

Is 3 Mbits/s maximum what I can get out of these system?

Thanks

3 REPLIES 3
Posted on June 13, 2016 at 19:25

The higher the baud rate, the more critical the correct selection of rate with respect to the available clock, as the % error in output rate become dominant due to the granularity of the clock, and the integer division.

36MHz perhaps 2.25 MHz, 72 MHz  perhaps 4.5 MHz

The other consideration is the bandwidth afforded by the drivers being used. What is the maximum rating for the RS422 drivers?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
matic
Associate III
Posted on June 13, 2016 at 20:10

I am not sure about drivers bandwidth, but I will check this tomorrow.

Is there any difference between UART1 which is on APB2 and UART2 which is on slower APB1, but configured to be clocked with SYSCLK clock? I did this through RCC->CFGR3 register.

Posted on June 13, 2016 at 21:22

USART's on APB1 will nominally run at half the maximum of those on APB2, but depends on the clock settings. OVER8 can also be used.

I'm generally not comfortable with the integrity of asynchronous serial at these rates.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..