UART cannot set high baud rate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 2:03 AM
I have a uart peripheral whose baud rate can only be set to 3.125M. However, the baud rate of another uart peripheral with the same clock configuration in the project can be set to 12.5M. I want to know what the baud rate limit is based on? How to increase the baud rate from 3.125M to 12.5M?
Solved! Go to Solution.
- Labels:
-
STM32F7 Series
-
UART-USART
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 8:53 PM
CubeMX is using the UART5 clock selection to determine the acceptable UART7 speeds. Clearly a bug. In MCUA it's set to SYSCLK=200MHz but in MCUB it's set to PCLK1=50MHz, hence the difference in behavior.
Easy workaround: enable UART5, set the clock selection to SYSCLK to match that of UART7, then disable UART5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 2:23 AM
You selected probably different oversampling modes or clock prescaler settings (in adv. parameters).
-> read in rm....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 3:12 AM
hi, AScha.3
Thanks for your answer, I checked the parameters are the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 3:15 AM
With the default 16x oversampling, the max baud rate is uart_input_clock / 16. Set the oversampling to 8 if you need more - then it's limited to uart_input_clock / 8. Or increase the UART input clock frequency if it is possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 3:53 AM - edited 2023-12-20 4:09 AM
But in pics you show : different speed limits, but for same peripheral - how this can be at same parameters and clk ?
but
I can do same :
and :
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 5:45 AM
The baud rate limit is based on the internal UART clock and the settings you use for the UART.
Attach your IOC if you're having issues. You show limits for the same peripheral twice, which isn't consistent with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 6:26 PM
In my project, two identical MCUs need to cross-communicate, but the upper limit of the baud rate of MCUB is limited, which troubles me.
Since i am not allowed to send ioc files, I took screenshots of the clock and uart configuration of the two chips. In addition, I am using the linux version(1.12.0) of CubeIDE.
MCUA
MCUB
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 6:30 PM
In my project, two identical MCUs need to cross-communicate, but the upper limit of the baud rate of MCUB is limited, which troubles me.
Since i am not allowed to send ioc files, I took screenshots of the clock and uart configuration of the two chips. In addition, I am using the linux version(1.12.0) of CubeIDE.
MCUA
MCUB
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 6:56 PM
I understand the issue you're describing now.
You can rename your IOC files to *.TXT and attach them.
It appears there is a bug with how CubeMX is calculating the max rate here, as it isn't adjusted for the selected clock source. There's probably a workaround, but I can't duplicate the issue. Seeing your IOC files would be insightful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-12-20 7:19 PM
