cancel
Showing results for 
Search instead for 
Did you mean: 

How to run UART on STM32H755 with speed above 1M baud rate

Ruồi
Associate III

Hello Experts,

I am having problem with uart on stm32h755, nucleo kit.
I use uart1 and uart2 to communicate with each other using DMA.
When I set the baud rate above 1M baud rate it doesn't work. Below is the clock configuration.Screenshot 2024-01-20 224149.png

And here is the UART configuration.

Screenshot 2024-01-20 224511.pngScreenshot 2024-01-20 224436.png

Looking forward to receiving any help.

Thanks,

RUOI

5 REPLIES 5

How does "doesn't work" manifest?

The receive is problematic? The transmit? Over / Underrun?

If you transmit a constant 0x55 ("U") pattern, can you check the frequency with a scope?

As the rates increases the frequency error can get larger / rougher. You want a bus clock that's closer to a multiple of 16 MHz for 1 MHz, in 16 Over mode.

If using RS232 level shifters, these have bandwidth limits around 1 Mbaud.

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

Dear Tesla DeLorean,

I just transmit from UART1 to UART2 and transmitted back.

Below is the code that performs the transmission and reception.

The problem is when I increase the baudRate to 2M the variables send_data, receive_data, echo_receive_data do not change. When I set the BaudRate to 1M, the variables change, proving that the UART is working.

Screenshot 2024-01-21 100332.png

Looking forward to receiving any help.

Thanks,

RUOI

 

Hello @Ruồi 

Baud rates at this level are not guaranteed to work reliably. You may need to rework your PCB to get better responsiveness.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I would suggest that if you really want to run that fast you should be using synchronous or switch to SPI.

Ruồi
Associate III

Hello F.Belaid,

I tried using baudrate 9600 and connecting to Maxlinear's XR1422IL to transmit and receive to the PC.
However, another problem arose. That is, on the computer, the baudrate must be set half lower, specifically 4800, to communicate successfully.

Below is an image of unsuccessful communication between the H755 on the nucleo kit and the XR1422IL of MAXLINEAR, when the baudrate set on the software is 9600.

Screenshot 2024-01-25 111610.png

Below is an image of successful communication between the H755 on the nucleo kit and MAXLINEAR's XR1422IL, when the software baudrate is set to 4800.

Screenshot 2024-01-25 112039.png

I also measured the TX pulse of the H755 but didn't find any problem.

z5101933605319_e57bbccc933ee039a4d8f4e6448e9920.jpg

Below is the processing code on H755

Screenshot 2024-01-25 112651.pngScreenshot 2024-01-25 112724.pngScreenshot 2024-01-25 112759.png

Looking forward to receiving any help.

Thanks,

RUOI