diff --git a/arch/arm/src/stm32h7/stm32_serial.c b/arch/arm/src/stm32h7/stm32_serial.c index 4b8048ed58..75971f1a11 100644 --- a/arch/arm/src/stm32h7/stm32_serial.c +++ b/arch/arm/src/stm32h7/stm32_serial.c @@ -3369,9 +3369,11 @@ static void up_dma_txavailable(struct uart_dev_s *dev) /* Only send when the DMA is idle */ - nxsem_wait(&priv->txdmasem); - - uart_xmitchars_dma(dev); + int rv = nxsem_trywait(&priv->txdmasem); + if (rv == OK) + { + uart_xmitchars_dma(dev); + } } #endif