aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32F1xx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-06-01 10:01:27 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-06-01 10:01:27 +0000
commit2e59e3f93cd61a3e24dce01bcf8ba861bb1c358c (patch)
tree934988777aa47faffe76aef9f1930c1f77ad9d90 /os/hal/ports/STM32/STM32F1xx
parent65e3013e8c6da7332d16ec8f24541eaf9f9bbc6c (diff)
downloadChibiOS-2e59e3f93cd61a3e24dce01bcf8ba861bb1c358c.tar.gz
ChibiOS-2e59e3f93cd61a3e24dce01bcf8ba861bb1c358c.tar.bz2
ChibiOS-2e59e3f93cd61a3e24dce01bcf8ba861bb1c358c.zip
Fixed bug #510.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6977 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32F1xx')
-rw-r--r--os/hal/ports/STM32/STM32F1xx/stm32_dma.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_dma.c b/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
index c3b39d37c..f6d8c8f49 100644
--- a/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
+++ b/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
@@ -472,7 +472,18 @@ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) {
"not allocated");
/* Disables the associated IRQ vector.*/
+#if !(STM32_HAS_DMA2 && !defined(STM32F10X_CL)) || defined(__DOXYGEN__)
nvicDisableVector(dmastp->vector);
+#else
+ /* Check unless it is 10 or 11 stream. If yes, make additional check before
+ disabling IRQ.*/
+ if (dmastp->selfindex < 10)
+ nvicDisableVector(dmastp->vector);
+ else {
+ if (dma_streams_mask & (3 << 10) == 0)
+ nvicDisableVector(dmastp->vector);
+ }
+#endif/* STM32_HAS_DMA2 && !STM32F10X_CL */
/* Marks the stream as not allocated.*/
dma_streams_mask &= ~(1 << dmastp->selfindex);