diff --git a/arch/arm/src/imxrt/imxrt_serial.c b/arch/arm/src/imxrt/imxrt_serial.c index 939ccc6e58..79babc44bd 100644 --- a/arch/arm/src/imxrt/imxrt_serial.c +++ b/arch/arm/src/imxrt/imxrt_serial.c @@ -2535,9 +2535,12 @@ static void imxrt_dma_txavailable(struct uart_dev_s *dev) /* Only send when the DMA is idle */ - nxsem_wait(&priv->txdmasem); + int rv = nxsem_trywait(&priv->txdmasem); - uart_xmitchars_dma(dev); + if (rv == 0) + { + uart_xmitchars_dma(dev); + } } #endif