aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-01-11 10:28:41 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-01-11 10:28:41 +0000
commited83337999ec1cd8ee7c66a5d6b11b9a2abf9f36 (patch)
tree02f7d3808b36c6c207bbb9b171ac9d216c5b08c3 /os
parentadc15caea1119f2d2506df4aa0e76f35f325b6ae (diff)
downloadChibiOS-ed83337999ec1cd8ee7c66a5d6b11b9a2abf9f36.tar.gz
ChibiOS-ed83337999ec1cd8ee7c66a5d6b11b9a2abf9f36.tar.bz2
ChibiOS-ed83337999ec1cd8ee7c66a5d6b11b9a2abf9f36.zip
Fixed bug #812.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10029 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h4
1 files changed, 2 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 da7d20d6e..6dfd6debf 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); \