diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-10 11:04:37 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-10 11:04:37 +0000 |
commit | 4e3ffc5134a06a4e6b87a02fc85bd16e77656bd4 (patch) | |
tree | c3513d4cf7da5a63816f4d174259803687ed2411 | |
parent | cd4329c9d1d6de9f4da731ac2d2a251ee45c87e4 (diff) | |
download | ChibiOS-4e3ffc5134a06a4e6b87a02fc85bd16e77656bd4.tar.gz ChibiOS-4e3ffc5134a06a4e6b87a02fc85bd16e77656bd4.tar.bz2 ChibiOS-4e3ffc5134a06a4e6b87a02fc85bd16e77656bd4.zip |
Fixed bug 3607518.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5401 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32F0xx/stm32_dma.h | 3 | ||||
-rw-r--r-- | os/hal/platforms/STM32F1xx/stm32_dma.h | 3 | ||||
-rw-r--r-- | os/hal/platforms/STM32F30x/stm32_dma.h | 3 | ||||
-rw-r--r-- | os/hal/platforms/STM32F37x/stm32_dma.h | 3 | ||||
-rw-r--r-- | os/hal/platforms/STM32F4xx/stm32_dma.h | 4 | ||||
-rw-r--r-- | os/hal/platforms/STM32L1xx/stm32_dma.h | 3 | ||||
-rw-r--r-- | readme.txt | 2 | ||||
-rw-r--r-- | testhal/STM32F4xx/UART/main.c | 4 |
8 files changed, 17 insertions, 8 deletions
diff --git a/os/hal/platforms/STM32F0xx/stm32_dma.h b/os/hal/platforms/STM32F0xx/stm32_dma.h index c07aa34fb..b7a07d6ea 100644 --- a/os/hal/platforms/STM32F0xx/stm32_dma.h +++ b/os/hal/platforms/STM32F0xx/stm32_dma.h @@ -309,7 +309,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->channel->CCR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->channel->CCR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_EN); \
dmaStreamClearInterrupt(dmastp); \
}
diff --git a/os/hal/platforms/STM32F1xx/stm32_dma.h b/os/hal/platforms/STM32F1xx/stm32_dma.h index ff83161fa..a0766ab06 100644 --- a/os/hal/platforms/STM32F1xx/stm32_dma.h +++ b/os/hal/platforms/STM32F1xx/stm32_dma.h @@ -320,7 +320,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->channel->CCR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->channel->CCR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_EN); \
dmaStreamClearInterrupt(dmastp); \
}
diff --git a/os/hal/platforms/STM32F30x/stm32_dma.h b/os/hal/platforms/STM32F30x/stm32_dma.h index 63e9d4265..6d82dd4b9 100644 --- a/os/hal/platforms/STM32F30x/stm32_dma.h +++ b/os/hal/platforms/STM32F30x/stm32_dma.h @@ -320,7 +320,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->channel->CCR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->channel->CCR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_EN); \
dmaStreamClearInterrupt(dmastp); \
}
diff --git a/os/hal/platforms/STM32F37x/stm32_dma.h b/os/hal/platforms/STM32F37x/stm32_dma.h index 474c94acc..257ed6054 100644 --- a/os/hal/platforms/STM32F37x/stm32_dma.h +++ b/os/hal/platforms/STM32F37x/stm32_dma.h @@ -320,7 +320,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->channel->CCR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->channel->CCR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_EN); \
dmaStreamClearInterrupt(dmastp); \
}
diff --git a/os/hal/platforms/STM32F4xx/stm32_dma.h b/os/hal/platforms/STM32F4xx/stm32_dma.h index cb4819f1d..9b745a917 100644 --- a/os/hal/platforms/STM32F4xx/stm32_dma.h +++ b/os/hal/platforms/STM32F4xx/stm32_dma.h @@ -373,7 +373,9 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->stream->CR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->stream->CR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_DMEIE | \
+ STM32_DMA_CR_EN); \
while (((dmastp)->stream->CR & STM32_DMA_CR_EN) != 0) \
; \
dmaStreamClearInterrupt(dmastp); \
diff --git a/os/hal/platforms/STM32L1xx/stm32_dma.h b/os/hal/platforms/STM32L1xx/stm32_dma.h index 8056428b3..3de9d4980 100644 --- a/os/hal/platforms/STM32L1xx/stm32_dma.h +++ b/os/hal/platforms/STM32L1xx/stm32_dma.h @@ -311,7 +311,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->channel->CCR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->channel->CCR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_EN); \
dmaStreamClearInterrupt(dmastp); \
}
diff --git a/readme.txt b/readme.txt index 3c70db221..f9649a73d 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,8 @@ *****************************************************************************
*** 2.5.2 ***
+- FIX: Fixed spurious interrupt disabling an STM32 DMA stream (bug 3607518)
+ (backported to 2.4.4).
- FIX: Fixed surprising non-CRLF lines in source (bug 3607380).
- FIX: Fixed no entry point defined at link time (bug 3607319).
- FIX: Fixed sdc_lld_collect_errors does not collect errors (bug 3606743).
diff --git a/testhal/STM32F4xx/UART/main.c b/testhal/STM32F4xx/UART/main.c index 5349471ca..99237e8ae 100644 --- a/testhal/STM32F4xx/UART/main.c +++ b/testhal/STM32F4xx/UART/main.c @@ -158,9 +158,9 @@ int main(void) { * handled entirely in background.
*/
uartStopReceive(&UARTD2);
-// uartStopSend(&UARTD2);
+ uartStopSend(&UARTD2);
uartStartReceive(&UARTD2, 16, buffer);
-// uartStartSend(&UARTD2, 16, message);
+ uartStartSend(&UARTD2, 16, message);
}
chThdSleepMilliseconds(500);
}
|