Skip to main content
After Forever
Senior III
November 9, 2018
Question

STM32CubeMX Feature Request - Show Baud Rate error percentage for serial peripherals

  • November 9, 2018
  • 2 replies
  • 560 views

It would be nice to see the baud rate's error percentage (especially for asynchronous serial peripherals) when setting the desired baud rate in the peripheral's configuration dialog.

For example, I'm setting 115200 Bits/s for USART1, STM32CubeMX knows that I have oversampling enabled, and my USART1 is clocked by PCLK2 which is 8Mhz. So it can calculate:

BRR = 8,000,000 / 115,200 = 69.44 = 69

8,000,000 / 69 = 115,942.02

(115,942.02 / 115,200) * 100 = 100.64

So the error percentage is +0.64%

Depending on the error percentage, it can also become a warning when it's too much.

Thanks!

This topic has been closed for replies.

2 replies

Amel NASRI
Technical Moderator
November 13, 2018

Hello,

Please note that your proposal is shared with our STM32CubeMX team, to be assessed and then let you know what can be done.

-Amel

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.
Tesla DeLorean
Guru
November 13, 2018

>> it can also become a warning when it's too much.

Can't it sustain something like +/-6.25%

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