You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the logic for selecting the UART prescaler is very simple. This should be made a lot smarter -- I believe we want to select the smallest prescaler such that (UART source clock freq) / (prescaler) <= (baudrate) * 4096. As for how to determine the UART clock source frequency, see UART_SetConfig() in the HAL. Also see UARTPrescTable as a way to map prescaler bitfield values to numbers.
Until this is done, using low baudrates on STM32 can cause problems -- e.g. if LPUART is clocked by HSI on STM32H7, and there is no LSE oscillator, the lowest baudrate that can be used is 15625 baud!
The text was updated successfully, but these errors were encountered:
Currently the logic for selecting the UART prescaler is very simple. This should be made a lot smarter -- I believe we want to select the smallest prescaler such that (UART source clock freq) / (prescaler) <= (baudrate) * 4096. As for how to determine the UART clock source frequency, see
UART_SetConfig()
in the HAL. Also seeUARTPrescTable
as a way to map prescaler bitfield values to numbers.Until this is done, using low baudrates on STM32 can cause problems -- e.g. if LPUART is clocked by HSI on STM32H7, and there is no LSE oscillator, the lowest baudrate that can be used is 15625 baud!
The text was updated successfully, but these errors were encountered: