Skip to content

Commit

Permalink
stm32h7:Serial Fix Logic error in up_dma_txavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
davids5 committed Mar 26, 2024
1 parent a5b5c96 commit 0c14333
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/src/stm32h7/stm32_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -3360,7 +3360,8 @@ static void up_dma_txavailable(struct uart_dev_s *dev)

/* Only send when the DMA is idle */

if ((priv->dev.dmatx.length && priv->dev.dmatx.nlength) == 0 &&
if (priv->dev.dmatx.length == 0 &&
priv->dev.dmatx.nlength == 0 &&
stm32_dmaresidual(priv->txdma) == 0)
{
uart_xmitchars_dma(dev);
Expand Down

0 comments on commit 0c14333

Please sign in to comment.