diff options
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 265669ee1..0dc47a81e 100644 --- a/os/hal/platforms/STM32/spi_lld.c +++ b/os/hal/platforms/STM32/spi_lld.c @@ -294,15 +294,15 @@ void spi_lld_start(SPIDriver *spip) { RCC->APB1ENR |= RCC_APB1ENR_SPI3EN;
}
#endif
+
+ /* DMA setup.*/
+ spip->spd_dmarx->CPAR = (uint32_t)&spip->spd_spi->DR;
+ spip->spd_dmatx->CPAR = (uint32_t)&spip->spd_spi->DR;
}
/* SPI setup.*/
spip->spd_spi->CR1 = spip->spd_config->spc_cr1 | SPI_CR1_MSTR;
spip->spd_spi->CR2 = SPI_CR2_SSOE | SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN;
-
- /* DMA setup.*/
- spip->spd_dmarx->CPAR = (uint32_t)&spip->spd_spi->DR;
- spip->spd_dmatx->CPAR = (uint32_t)&spip->spd_spi->DR;
}
/**
|