cancel
Showing results for 
Search instead for 
Did you mean: 

How to run uart1 and uart6 in above 5 mbps speed in stm32F410CBT6 microcontroller in UART Mode?

Lkhod.1
Associate II

Hello All,

This is Lalit from Teq Diligent.

Currently I am working in STM32F410CBT6 Controller.

I want to communicate UART with my another same controller.

I want to generate more then 5Mbps speed in UART mode for the same controller in both the side.

Is this possible in the controller?

If it is not achievable then what is correct configuration for the getting more then 5Mbps speed in UART.

My configuration :

Currently I have following uart configuration in "STM32F410CBT6 ".

I achieve max 921Khz uart baud rate in the same controller. But i want more then 5Mbps.

I configured uart1 with baud rate 4000000 Mbps with clock frequency 84 MHz and 100Mhz .

I am using DMA feature in UART.

my uart1 configuration is given below

 huart1.Instance = USART1;

 huart1.Init.BaudRate = 4000000;

 huart1.Init.WordLength = UART_WORDLENGTH_8B;

 huart1.Init.StopBits = UART_STOPBITS_1;

 huart1.Init.Parity = UART_PARITY_NONE;

 huart1.Init.Mode = UART_MODE_TX_RX;

 huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;

 huart1.Init.OverSampling = UART_OVERSAMPLING_16;

 if (HAL_UART_Init(&huart1) != HAL_OK)

 {

  Error_Handler();

 }

Please help me to solve this error.

I am waiting for response.

Thank You

7 REPLIES 7

Are you doing this across an RS232 level converter?

The STM32 should be capable of higher speeds, although the higher you go the larger the potential rate error based on the bus clock and how divisible that is.

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

Why is it not achievable? What problems are you running into?

No problems with 5Mbaud UART here on the STM32F4 series. Note that you'll need to drive the pins in push pull mode or otherwise verify the signal on the line is valid with the pullups present.

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

This pin is push pull mode,but we achieve max 921Khz uart baud rate in the STM32F410CBT6 microcontroller . But Above this baud rate Garbage value come in my pc , we use putty app for serial data monitor ,

If you're transferring data between MCUs, how is the data getting to the PC in PuTTY?
Note that most common USB to UART chips are limited to around 1 Mbaud.
If you feel a post has answered your question, please click "Accept as Solution".
Lkhod.1
Associate II

i try with two Nucleo - f410RB communicate two board led on and off , this is also work with max 921 khz baud rate. above this 921 khz stop the communication.

What speed are you clocking the APB ? Does the initialization report an error?

Have you looked at the signal with a scope? Send a repeating 0x55 ('U') pattern.

On a 100 MHz system, try 3125000 baud,should be a clean workable multiple.

Async-serial isn't well suited to high speeds, very little in the way of integrity checking or recovery.

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

UARTs on APB2 clocking at 100 MHz should be able to get to 12.5 Mbaud with OVER8 mode, the APB1 at 50 MHz, 6.25 Mbaud

You work for a consulting business, perhaps you have some colleagues or supervisor who can provide direction or assistance?

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