2023-12-20 02: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.
2023-12-20 08: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.
2023-12-20 02:23 AM
You selected probably different oversampling modes or clock prescaler settings (in adv. parameters).
-> read in rm....
2023-12-20 03:12 AM
hi, AScha.3
Thanks for your answer, I checked the parameters are the same.
2023-12-20 03: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.
2023-12-20 03:53 AM - edited 2023-12-20 04: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 :
:)
2023-12-20 05: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.
2023-12-20 06: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.
2023-12-20 06: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.
2023-12-20 06: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.
2023-12-20 07:19 PM