Browse Source

drivers/dma: stm32: don't omit IRQ status check in dma_is_irq_active

Fix stm32_dma_is_irq_active not checking the IRQ status(IsEnabled) for
active interrupts.
While the transfer-complete, half-transfer comp.  and transfer-error
is_XX_irq_active() functions check for IRQ status (IsEnabled),
ORing the result with dma_stm32_is_gi_active() overrides the
status check as gi is always 1 in case any of these flags is active.
Related to commit 96c92ed93f.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
pull/34200/head
Thomas Stranger 4 years ago committed by Anas Nashif
parent
commit
1e3512c94e
  1. 3
      drivers/dma/dma_stm32_v2.c

3
drivers/dma/dma_stm32_v2.c

@ -263,8 +263,7 @@ bool stm32_dma_is_irq_active(DMA_TypeDef *dma, uint32_t id) @@ -263,8 +263,7 @@ bool stm32_dma_is_irq_active(DMA_TypeDef *dma, uint32_t id)
{
return stm32_dma_is_tc_irq_active(dma, id) ||
stm32_dma_is_ht_irq_active(dma, id) ||
stm32_dma_is_te_irq_active(dma, id) ||
dma_stm32_is_gi_active(dma, id);
stm32_dma_is_te_irq_active(dma, id);
}
void stm32_dma_clear_stream_irq(DMA_TypeDef *dma, uint32_t id)

Loading…
Cancel
Save