From 980025650718f301eabac3038bcd0ce263979bc1 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 22 Mar 2021 11:12:13 -0700 Subject: [PATCH] stm32h7:DMA BDMA does not auto disabled on completion --- arch/arm/src/stm32h7/stm32_dma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/src/stm32h7/stm32_dma.c b/arch/arm/src/stm32h7/stm32_dma.c index 62db696278..e99f7777db 100644 --- a/arch/arm/src/stm32h7/stm32_dma.c +++ b/arch/arm/src/stm32h7/stm32_dma.c @@ -1841,6 +1841,10 @@ static void stm32_bdma_setup(DMA_HANDLE handle, FAR stm32_dmacfg_t *cfg) * for the EN bit to be cleared before starting any stream configuration." */ + regval = dmachan_getreg(dmachan, STM32_BDMACH_CCR_OFFSET); + regval &= ~BDMA_CCR_EN; + dmachan_putreg(dmachan, STM32_BDMACH_CCR_OFFSET, regval); + while ((dmachan_getreg(dmachan, STM32_BDMACH_CCR_OFFSET) & BDMA_CCR_EN) != 0);