Skip to main content
After Forever
Senior III
Nov 9, 2018 10:57 AM UTC
Question

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

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
ST Technical Moderator
Nov 13, 2018 10:28 AM UTC

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 "Best Answer" on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
Nov 13, 2018 12:53 PM UTC

>> 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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..