diff --git a/chip/stm32l/uart.c b/chip/stm32l/uart.c index 0127c7bf72..9d5dd139f7 100644 --- a/chip/stm32l/uart.c +++ b/chip/stm32l/uart.c @@ -59,6 +59,11 @@ int uart_rx_available(void) void uart_write_char(char c) { + /* we normally never wait here since uart_write_char is normally called + * when the buffer is ready, excepted when we insert a carriage return + * before a line feed in the interrupt routine. + */ + while (!uart_tx_ready()) ; STM32L_USART_DR(UARTN) = c; }