STM32H753 UART Baud is 15% low.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-12 8:08 AM
STM32H753 UART Baud is 15% low. I set it to 115200, but it's running at 98400. Is this a misconfigured clock?
Solved! Go to Solution.
- Labels:
-
FreeRTOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-12 1:38 PM
> Why do you say they look cube-generated? There are no MX_ functions called, just HAL.
Because of the comments and other style hints.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-12 6:33 PM
Where is your ClockPrescaler value?
huart6.Instance = USART6;
huart6.Init.BaudRate = 115200;
huart6.Init.WordLength = UART_WORDLENGTH_8B;
huart6.Init.StopBits = UART_STOPBITS_1;
huart6.Init.Parity = UART_PARITY_NONE;
huart6.Init.Mode = UART_MODE_TX_RX;
huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart6.Init.OverSampling = UART_OVERSAMPLING_16;
huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
Should have something like this within your code above.
huart6.Init.ClockPrescaler = UART_PRESCALER_DIV1;
Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-15 7:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-15 8:06 AM
Hi Karl,
That was it! Thanks!
Glenn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-15 8:19 AM - edited ‎2024-07-15 8:58 AM
How can the wrong value for an integer divisor prescaler cause a 15% error in baud rate?!
If DIV=1 gives you the expected baud rate, and this really was the cause behind your issue, that would mean that the integer-valued prescaler was previously set to DIV=1.15, which is impossible.
- Please post an update with details once you've solved your issue. Your experience may help others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-15 8:39 AM
Exactly, I think we're getting a very selective view of the facts/details, as on it's own that makes no rational sense.
Perhaps it breaks the math for the BRR computation, but none of the register values has been shared or contextualized. Details of the memory the variables reside in, or the structure content as passed to the initialization routine.
Up vote any posts that you find helpful, it shows what's working..

- « Previous
- Next »