diff options
Diffstat (limited to 'os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.c')
-rw-r--r-- | os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.c b/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.c index 15cc0d1e7..8baf59717 100644 --- a/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.c +++ b/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.c @@ -425,7 +425,8 @@ void spi_lld_start(SPIDriver *spip) { spip->spi->CR1 = 0;
spip->spi->CR1 = spip->config->cr1 | SPI_CR1_MSTR | SPI_CR1_SSM |
SPI_CR1_SSI;
- spip->spi->CR2 = SPI_CR2_SSOE | SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN;
+ spip->spi->CR2 = spip->config->cr2 | SPI_CR2_SSOE | SPI_CR2_RXDMAEN |
+ SPI_CR2_TXDMAEN;
spip->spi->CR1 |= SPI_CR1_SPE;
}
|