aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/OCTOSPIv1
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-11-14 09:24:25 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-11-14 09:24:25 +0000
commit27ad46cdfdfd3565b0376a96a3068839a3c63250 (patch)
tree7559f401151b8415b831cef372481c3fa08e96cf /os/hal/ports/STM32/LLD/OCTOSPIv1
parent6e0f6445b67755c1e39495f351a67eb718332e76 (diff)
downloadChibiOS-27ad46cdfdfd3565b0376a96a3068839a3c63250.tar.gz
ChibiOS-27ad46cdfdfd3565b0376a96a3068839a3c63250.tar.bz2
ChibiOS-27ad46cdfdfd3565b0376a96a3068839a3c63250.zip
Minor changes to MFS project.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12421 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/STM32/LLD/OCTOSPIv1')
-rw-r--r--os/hal/ports/STM32/LLD/OCTOSPIv1/hal_wspi_lld.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/os/hal/ports/STM32/LLD/OCTOSPIv1/hal_wspi_lld.c b/os/hal/ports/STM32/LLD/OCTOSPIv1/hal_wspi_lld.c
index e3cc607a4..f121e14bb 100644
--- a/os/hal/ports/STM32/LLD/OCTOSPIv1/hal_wspi_lld.c
+++ b/os/hal/ports/STM32/LLD/OCTOSPIv1/hal_wspi_lld.c
@@ -285,9 +285,6 @@ void wspi_lld_stop(WSPIDriver *wspip) {
*/
void wspi_lld_command(WSPIDriver *wspip, const wspi_command_t *cmdp) {
- /* Waiting for the previous operation to complete, if any.*/
- wspi_lld_sync(wspip);
-
#if 0 //STM32_USE_STM32_D1_WORKAROUND == TRUE
/* If it is a command without address and alternate phases then the command
is sent as an alternate byte, the command phase is suppressed.*/
@@ -309,6 +306,9 @@ void wspi_lld_command(WSPIDriver *wspip, const wspi_command_t *cmdp) {
if ((cmdp->cfg & WSPI_CFG_ADDR_MODE_MASK) != WSPI_CFG_ADDR_MODE_NONE) {
wspip->ospi->AR = cmdp->addr;
}
+
+ /* Waiting for the previous operation to complete.*/
+ wspi_lld_sync(wspip);
}
/**
@@ -338,9 +338,6 @@ void wspi_lld_send(WSPIDriver *wspip, const wspi_command_t *cmdp,
dmaStreamSetTransactionSize(wspip->dma, n);
dmaStreamSetMode(wspip->dma, wspip->dmamode | STM32_DMA_CR_DIR_M2P);
- /* Waiting for the previous operation to complete, if any.*/
- wspi_lld_sync(wspip);
-
wspip->ospi->CR &= ~OCTOSPI_CR_FMODE;
wspip->ospi->DLR = n - 1U;
wspip->ospi->TCR = cmdp->dummy;
@@ -381,9 +378,6 @@ void wspi_lld_receive(WSPIDriver *wspip, const wspi_command_t *cmdp,
dmaStreamSetTransactionSize(wspip->dma, n);
dmaStreamSetMode(wspip->dma, wspip->dmamode | STM32_DMA_CR_DIR_P2M);
- /* Waiting for the previous operation to complete, if any.*/
- wspi_lld_sync(wspip);
-
wspip->ospi->CR = (wspip->ospi->CR & ~OCTOSPI_CR_FMODE) | OCTOSPI_CR_FMODE_0;
wspip->ospi->DLR = n - 1U;
wspip->ospi->TCR = cmdp->dummy;
@@ -414,9 +408,6 @@ void wspi_lld_map_flash(WSPIDriver *wspip,
const wspi_command_t *cmdp,
uint8_t **addrp) {
- /* Waiting for the previous operation to complete, if any.*/
- wspi_lld_sync(wspip);
-
/* Starting memory mapped mode using the passed parameters.*/
wspip->ospi->CR = OCTOSPI_CR_FMODE_1 | OCTOSPI_CR_FMODE_0 | OCTOSPI_CR_EN;
wspip->ospi->TCR = cmdp->dummy;