Skip to main content
RPred.1
Associate
October 5, 2020
Solved

Why when I set the baud rate for an UART pin I have to set it to 3 times the desired value?

  • October 5, 2020
  • 2 replies
  • 1633 views

Hello, I have an issue with Cube IDE and a Nucleo-F722ZE board. When I want a baud rate of 9600 for the UART port I need to set it to 28800 inside Cube IDE for it to be the desired value. I've tested this with two different UART adapters and both indicate that this is really happening.

UART parameters

0693W000004IfSxQAK.png

Clock configuration of the board (the default one, I haven't changed anything here)

0693W000004IgBnQAK.png

Thank you very much for your help!

This topic has been closed for replies.
Best answer by TDK

Probably what is happening is the HSE clock source on the board is 8 MHz while your code assumes it is 25 MHz.

2 replies

TDK
TDKBest answer
October 5, 2020

Probably what is happening is the HSE clock source on the board is 8 MHz while your code assumes it is 25 MHz.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RPred.1
RPred.1Author
Associate
October 5, 2020

That was it, thank you so much. I didn't even think about that and just assumed the default board config will know that value too. You saved me from a lot of frustration.