drivers/dma: stm32: Don't omit IRQ status check

When checking for IRQ flags, we should also check
for IRQ status (IsEnabled ?).
If this is not done we can end up in Half Transfer
interrupt processing while it is not enabled.

Additionaly always use the id translation function
in LL API calls.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2021-02-03 16:57:10 +01:00 committed by Anas Nashif
commit 96c92ed93f
4 changed files with 22 additions and 16 deletions

View file

@ -81,6 +81,8 @@ void dma_stm32_clear_gi(DMA_TypeDef *DMAx, uint32_t id);
#endif
bool stm32_dma_is_irq_active(DMA_TypeDef *dma, uint32_t id);
bool stm32_dma_is_ht_irq_active(DMA_TypeDef *dma, uint32_t id);
bool stm32_dma_is_tc_irq_active(DMA_TypeDef *dma, uint32_t id);
void stm32_dma_dump_stream_irq(DMA_TypeDef *dma, uint32_t id);
void stm32_dma_clear_stream_irq(DMA_TypeDef *dma, uint32_t id);