From 61c73e5d88dacab8c4732bcaf4d0735b3fbadb0d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 11 Jan 2017 10:28:37 +0000 Subject: [PATCH] Fixed bug #812. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_16.1.x@10028 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h | 4 ++-- readme.txt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h index ad0f62836..99f1814e8 100644 --- a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h +++ b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h @@ -48,7 +48,7 @@ /** * @brief Mask of the ISR bits passed to the DMA callback functions. */ -#define STM32_DMA_ISR_MASK 0x0F +#define STM32_DMA_ISR_MASK 0x0E /** * @brief From stream number to shift factor in @p ISR and @p IFCR registers. @@ -444,7 +444,7 @@ typedef struct { uint32_t idx = (dmastp)->selfindex; \ \ flags = ((dmastp)->dma->ISR >> (dmastp)->shift) & STM32_DMA_ISR_MASK; \ - if (flags & STM32_DMA_ISR_MASK) { \ + if (flags & (dmastp)->channel->CCR) { \ (dmastp)->dma->IFCR = flags << (dmastp)->shift; \ if (_stm32_dma_isr_redir[idx].dma_func) { \ _stm32_dma_isr_redir[idx].dma_func(_stm32_dma_isr_redir[idx].dma_param, flags); \ diff --git a/readme.txt b/readme.txt index 4b5b13268..f17db3462 100644 --- a/readme.txt +++ b/readme.txt @@ -73,6 +73,8 @@ ***************************************************************************** *** 16.1.7 *** +- HAL: Fixed incorrect handling of shared ISRs in STM32 DMAv1 driver + (bug #812). - HAL: Fixed protocol violation in usbDisableEndpointsI() API (bug #811). - HAL: Fixed incorrect constants STM32_DAC1_CHx_DMA_CHN for STM32F7 (bug #810). - HAL: Fixed redefined TIM in STM32F030 registry (bug #809).