aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-08-15 09:12:30 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-08-15 09:12:30 +0000
commite1332d571cd73e0d834830746472e8d93b62eec2 (patch)
tree8d228aee3c6f2466e646a1af91401988c66e0ca2
parentf52c062a19563a76960eef4b535327909b6059b9 (diff)
downloadChibiOS-e1332d571cd73e0d834830746472e8d93b62eec2.tar.gz
ChibiOS-e1332d571cd73e0d834830746472e8d93b62eec2.tar.bz2
ChibiOS-e1332d571cd73e0d834830746472e8d93b62eec2.zip
Fixed bug #630.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8217 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c13
-rw-r--r--readme.txt2
2 files changed, 6 insertions, 9 deletions
diff --git a/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c b/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c
index 821688d51..6be5df7bd 100644
--- a/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c
+++ b/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c
@@ -342,15 +342,6 @@ void i2s_lld_start(I2SDriver *i2sp) {
#endif
}
#endif
-
- if (NULL != i2sp->dmarx) {
- dmaStreamSetMode(i2sp->dmarx, i2sp->rxdmamode);
- dmaStreamSetPeripheral(i2sp->dmarx, &i2sp->spi->DR);
- }
- if (NULL != i2sp->dmatx) {
- dmaStreamSetMode(i2sp->dmatx, i2sp->txdmamode);
- dmaStreamSetPeripheral(i2sp->dmatx, &i2sp->spi->DR);
- }
}
/* I2S (re)configuration.*/
@@ -412,6 +403,8 @@ void i2s_lld_start_exchange(I2SDriver *i2sp) {
/* RX DMA setup.*/
if (NULL != i2sp->dmarx) {
+ dmaStreamSetMode(i2sp->dmarx, i2sp->rxdmamode);
+ dmaStreamSetPeripheral(i2sp->dmarx, &i2sp->spi->DR);
dmaStreamSetMemory0(i2sp->dmarx, i2sp->config->rx_buffer);
dmaStreamSetTransactionSize(i2sp->dmarx, size);
dmaStreamEnable(i2sp->dmarx);
@@ -419,6 +412,8 @@ void i2s_lld_start_exchange(I2SDriver *i2sp) {
/* TX DMA setup.*/
if (NULL != i2sp->dmatx) {
+ dmaStreamSetMode(i2sp->dmatx, i2sp->txdmamode);
+ dmaStreamSetPeripheral(i2sp->dmatx, &i2sp->spi->DR);
dmaStreamSetMemory0(i2sp->dmatx, i2sp->config->tx_buffer);
dmaStreamSetTransactionSize(i2sp->dmatx, size);
dmaStreamEnable(i2sp->dmatx);
diff --git a/readme.txt b/readme.txt
index e454ae5af..d4669d8ca 100644
--- a/readme.txt
+++ b/readme.txt
@@ -95,6 +95,8 @@
- HAL: Introduced support for TIM21 and TIM22 in STM32 ST driver.
- HAL: Updated STM32F0xx headers to STM32CubeF0 version 1.3.0. Added support
for STM32F030xC, STM32F070x6, STM32F070xB devices.
+- HAL: Fixed problem with STM32 I2S driver restart (bug #630)(backported
+ to 3.0.2).
- HAL: Fixed STM32F3xx ADC driver uses US2RTC directly (bug #629)(backported
to 3.0.2).
- HAL: Fixed CEC clock cannot be disabled on STM32F0xx (bug #628)