diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-07-06 16:44:00 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-07-06 16:44:00 +0000 |
commit | f6554b6135a1ca9cb4b2aa05b7cbc94f828ed996 (patch) | |
tree | 0ed13bd062d2ebe63c45dab675eb3b7b72acf265 /os | |
parent | ec747ff6fbf6c22b244fb25bea3aa17ae8b6f8e7 (diff) | |
download | ChibiOS-f6554b6135a1ca9cb4b2aa05b7cbc94f828ed996.tar.gz ChibiOS-f6554b6135a1ca9cb4b2aa05b7cbc94f828ed996.tar.bz2 ChibiOS-f6554b6135a1ca9cb4b2aa05b7cbc94f828ed996.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2061 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/platforms/STM32/spi_lld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/spi_lld.c b/os/hal/platforms/STM32/spi_lld.c index af4fdfc3d..c70e127e8 100644 --- a/os/hal/platforms/STM32/spi_lld.c +++ b/os/hal/platforms/STM32/spi_lld.c @@ -87,14 +87,14 @@ static void spi_start_wait(SPIDriver *spip, size_t n, spip->spd_dmatx->CNDTR = (uint32_t)n;
spip->spd_dmatx->CCR |= ccr;
- /* DMAs start.*/
- spip->spd_dmarx->CCR |= DMA_CCR1_EN;
- spip->spd_dmatx->CCR |= DMA_CCR1_EN;
-
/* SPI enable.*/
chSysLock();
spip->spd_spi->CR1 |= SPI_CR1_SPE;
+ /* DMAs start.*/
+ spip->spd_dmarx->CCR |= DMA_CCR1_EN;
+ spip->spd_dmatx->CCR |= DMA_CCR1_EN;
+
/* Wait for completion event.*/
spip->spd_thread = currp;
chSchGoSleepS(THD_STATE_SUSPENDED);
|