Skip to content

Commit

Permalink
drivers: serial: stm32 uart driver asserts when baudRate >=16
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FRASTM authored and nashif committed May 30, 2023
1 parent 4f5be73 commit d69f763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/uart_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d69f763

Please sign in to comment.