Skip to content
Commit 5933705d authored by Yong Cong Sin's avatar Yong Cong Sin Committed by Christopher Friedt
Browse files

driver: serial: uart_stm32: Calculate suitable PRESCALER value



Current driver set a fixed prescaler value for the lpuart
that caused certain baudrate configurations to fail due to
LPUARTDIV overflow the LPUART_BRR register.

This PR attempt to calculate a suitable PRESCALER for the
selected baudrate, throws error and return if it couldn't get
an optimal one.

Signed-off-by: default avatarYong Cong Sin <yongcong.sin@gmail.com>
parent f77cb920
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment