aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-10-26 11:50:09 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-10-26 11:50:09 +0000
commitd47ce46522242c3be16aacafcdb5b978ff91c018 (patch)
treee797663be1570e8ff2b2bf57b003ddf0cec0456e
parent6c2c5f652642fceb499428f2aa67ad0b21eff457 (diff)
downloadChibiOS-d47ce46522242c3be16aacafcdb5b978ff91c018.tar.gz
ChibiOS-d47ce46522242c3be16aacafcdb5b978ff91c018.tar.bz2
ChibiOS-d47ce46522242c3be16aacafcdb5b978ff91c018.zip
Fixed bug #540.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7426 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c b/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c
index e05b60cb7..2df416c2b 100644
--- a/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c
+++ b/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c
@@ -399,8 +399,15 @@ void i2s_lld_start_exchange(I2SDriver *i2sp) {
size_t size = i2sp->config->size;
/* In 32 bit modes the DMA has to perform double operations because fetches
- are always performed using 16 bit accesses.*/
- if ((i2sp->config->i2scfgr & (SPI_I2SCFGR_DATLEN | SPI_I2SCFGR_CHLEN)) != 0)
+ are always performed using 16 bit accesses.
+ DATLEN CHLEN SIZE
+ 00 (16) 0 (16) 16
+ 00 (16) 1 (32) 16
+ 01 (24) X 32
+ 10 (32) X 32
+ 11 (NA) X NA
+ */
+ if ((i2sp->config->i2scfgr & SPI_I2SCFGR_DATLEN) != 0)
size *= 2;
/* RX DMA setup.*/