cancel
Showing results for 
Search instead for 
Did you mean: 

F411RE USART2: Cannot Achieve 3M Baud Rate

HDaji.1
Senior

I am testing F411RE Nucleo USART speed.

Sample code is: STM32Cube_FW_F4_V1.26.0\Projects\STM32F411RE-Nucleo\Examples_LL\USART\USART_Communication_TxRx_DMA

At PC side, I am using Putty as serial receiver.

So far, the highest working baud rate is slightly more than 2M; however, the data sheet for STM32F411xC and STM32F411xE claims at least 3M.

0693W00000LxJHXQA3.pngAnything I can do to the code to achieve that?

8 REPLIES 8

You ability to hit 3Mbaud exactly would require you to run the bus at 48 MHz, and CPU at 96 MHz, not 100 MHz

The higher the rate, the larger the potential error due to the way the divider works.

Also be aware that most RS232 level shifters frequently have a bandwidth of 1 Mbaud.

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

> At PC side, I am using Putty as serial receiver.

Do you if the PC side support 3MBaud? Most UART to USB chips top out support at around 1 MBaud.

Getting a logic analyzer on the RX and TX lines would confirm.

Also need to ensure the clock source is stable (i.e. use HSE) and that the chosen baud rate is compatible with your clock rate (i.e. an integer multiple or otherwise within tolerance limits).

If you feel a post has answered your question, please click "Accept as Solution".

yes, PC side supports, which I have verified with another device.

My guess is a clock issue then.
I use 5 MBaud on the STM32F4 without issue.
If you feel a post has answered your question, please click "Accept as Solution".

Which USART do you use?

Could you be more specific on how to correctly set its clock?

Send a repetitive 0x55 ('U') pattern at the baud rate you've set, and scope that, measuring the frequency. Should read 1.5 MHz for 3.0 Mbaud

BRR = APBCLK / (Baud * 16)

100 MHz / 2 * 16 = 3.125 Mbaud (4% off 3 Mbaud)

100 MHz / 1 * 16 = 6.25 Mbaud

To hit 3 Mbaud more exactly you'll need APB2:96 MHz, APB1:48 MHz, due to the use of integer dividers.

Set up the PLL to run your F411 at 96 MHz rather than 100 MHz

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

What is tge clock source tolerance, and how does it fares with baudrate spread?

Sorry, I don't get the point of your question?