From d69f7636e31fc11855ac80ac62de7de9d840158d Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Mon, 29 May 2023 10:55:12 +0200 Subject: [PATCH] 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 --- drivers/serial/uart_stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index 653e5201f94..004679b5011 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -188,7 +188,7 @@ static inline void uart_stm32_set_baudrate(const struct device *dev, uint32_t ba #endif baud_rate); /* 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"); #if HAS_LPUART_1