aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-06-01 10:16:24 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-06-01 10:16:24 +0000
commit31774bb3d79d528926bf2c0dffa951bda0ba56f1 (patch)
treef15958bb57d8cde219952989a08596046da58991 /os/hal
parent2e59e3f93cd61a3e24dce01bcf8ba861bb1c358c (diff)
downloadChibiOS-31774bb3d79d528926bf2c0dffa951bda0ba56f1.tar.gz
ChibiOS-31774bb3d79d528926bf2c0dffa951bda0ba56f1.tar.bz2
ChibiOS-31774bb3d79d528926bf2c0dffa951bda0ba56f1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6980 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/STM32/STM32F1xx/stm32_dma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_dma.c b/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
index f6d8c8f49..63e7c0778 100644
--- a/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
+++ b/os/hal/ports/STM32/STM32F1xx/stm32_dma.c
@@ -471,6 +471,9 @@ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) {
osalDbgAssert((dma_streams_mask & (1 << dmastp->selfindex)) != 0,
"not allocated");
+ /* Marks the stream as not allocated.*/
+ dma_streams_mask &= ~(1 << dmastp->selfindex);
+
/* Disables the associated IRQ vector.*/
#if !(STM32_HAS_DMA2 && !defined(STM32F10X_CL)) || defined(__DOXYGEN__)
nvicDisableVector(dmastp->vector);
@@ -485,9 +488,6 @@ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) {
}
#endif/* STM32_HAS_DMA2 && !STM32F10X_CL */
- /* Marks the stream as not allocated.*/
- dma_streams_mask &= ~(1 << dmastp->selfindex);
-
/* Shutting down clocks that are no more required, if any.*/
if ((dma_streams_mask & STM32_DMA1_STREAMS_MASK) == 0)
rccDisableDMA1(FALSE);