From c798248dd1e9a7b072fea08c98aea26036e7170c Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 12 Sep 2024 13:21:41 +0800 Subject: [PATCH] serial/uart_pl011: default syslog needs to check flow control in up_putc default syslog needs to check flow control in up_putc(), otherwise up_puts() will lose character if the hardware fifo is full. --- drivers/serial/uart_pl011.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index 64e42589070c3..3325568e93cde 100644 --- a/drivers/serial/uart_pl011.c +++ b/drivers/serial/uart_pl011.c @@ -661,6 +661,8 @@ static void pl011_send(FAR struct uart_dev_s *dev, int ch) FAR struct pl011_uart_port_s *sport = dev->priv; FAR const struct pl011_config *config = &sport->config; + while (!pl011_irq_tx_ready(sport)); + config->uart->dr = ch; }