diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-05-13 09:03:46 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-05-13 09:03:46 +0000 |
commit | 16feb88c2dc82420390b56226e8fe7cbc49aeb3b (patch) | |
tree | 372dc0ee71b9724c5de10e725e66877a92f24ebc /os/hal/platforms/STM8S | |
parent | 463a7d9bc131df78aca375e16921f58e7dbbebdf (diff) | |
download | ChibiOS-16feb88c2dc82420390b56226e8fe7cbc49aeb3b.tar.gz ChibiOS-16feb88c2dc82420390b56226e8fe7cbc49aeb3b.tar.bz2 ChibiOS-16feb88c2dc82420390b56226e8fe7cbc49aeb3b.zip |
Fixed STM8S SPI driver. Fixed STM32 DMA2 channels 4 and 5 sharing.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2949 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM8S')
-rw-r--r-- | os/hal/platforms/STM8S/spi_lld.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/platforms/STM8S/spi_lld.c b/os/hal/platforms/STM8S/spi_lld.c index f9af72cde..57e459d80 100644 --- a/os/hal/platforms/STM8S/spi_lld.c +++ b/os/hal/platforms/STM8S/spi_lld.c @@ -130,8 +130,10 @@ void spi_lld_start(SPIDriver *spip) { CLK->PCKENR1 |= CLK_PCKENR1_SPI; /* PCKEN11, clock source. */
/* Configuration.*/
- SPI->CR2 = 0;
- SPI->CR1 = spip->config->cr1 | SPI_CR1_MSTR | SPI_CR1_SPE;
+ SPI->CR1 = 0;
+ SPI->CR1 = spip->config->cr1 | SPI_CR1_MSTR;
+ SPI->CR2 = SPI_CR2_SSI | SPI_CR2_SSM;
+ SPI->CR1 |= SPI_CR1_SPE;
}
/**
|