drivers: serial: stm32 uart driver asserts when baudRate >=16

Change the assertion when evaluating the baudrate to trig if
result is greater or equal to 16.
This will also match the comment : checking BRR.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2023-05-29 10:55:12 +02:00 committed by Anas Nashif
commit d69f7636e3

View file

@ -188,7 +188,7 @@ static inline void uart_stm32_set_baudrate(const struct device *dev, uint32_t ba
#endif #endif
baud_rate); baud_rate);
/* Check BRR is greater than or equal to 16d */ /* Check BRR is greater than or equal to 16d */
__ASSERT(LL_USART_ReadReg(config->usart, BRR) > 16, __ASSERT(LL_USART_ReadReg(config->usart, BRR) >= 16,
"BaudRateReg >= 16"); "BaudRateReg >= 16");
#if HAS_LPUART_1 #if HAS_LPUART_1