From 1218ee5f51fdc5c822c6c9c0d933e33332f0d1a0 Mon Sep 17 00:00:00 2001 From: ziggurat29 Date: Mon, 25 Apr 2016 10:27:02 -0500 Subject: [PATCH] bug in binding peripheral to dma channel; inverted sense of a bitmask --- arch/arm/src/stm32l4/stm32l4x6xx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/stm32l4/stm32l4x6xx_dma.c b/arch/arm/src/stm32l4/stm32l4x6xx_dma.c index a45d33970b..eb91e3a754 100644 --- a/arch/arm/src/stm32l4/stm32l4x6xx_dma.c +++ b/arch/arm/src/stm32l4/stm32l4x6xx_dma.c @@ -523,7 +523,7 @@ void stm32l4_dmasetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, /* define peripheral indicated in dmach->function */ regval = dmabase_getreg(dmach, STM32L4_DMA_CSELR_OFFSET); - regval &= (0x0f << (dmach->chan << 2)); + regval &= ~(0x0f << (dmach->chan << 2)); regval |= (dmach->function << (dmach->chan << 2)); dmabase_putreg(dmach, STM32L4_DMA_CSELR_OFFSET, regval); }