git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13776 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2020-07-23 12:54:37 +00:00
parent dd9165f7bd
commit 20f514fe35
4 changed files with 18 additions and 7 deletions

View File

@ -71,9 +71,10 @@ typedef enum {
WSPI_UNINIT = 0, /**< Not initialized. */ WSPI_UNINIT = 0, /**< Not initialized. */
WSPI_STOP = 1, /**< Stopped. */ WSPI_STOP = 1, /**< Stopped. */
WSPI_READY = 2, /**< Ready. */ WSPI_READY = 2, /**< Ready. */
WSPI_ACTIVE = 3, /**< Exchanging data. */ WSPI_SEND = 3, /**< Sending data. */
WSPI_COMPLETE = 4, /**< Asynchronous operation complete. */ WSPI_RECEIVE = 4, /**< Receiving data. */
WSPI_MEMMAP = 5 /**< In memory mapped mode. */ WSPI_COMPLETE = 5, /**< Asynchronous operation complete. */
WSPI_MEMMAP = 6 /**< In memory mapped mode. */
} wspistate_t; } wspistate_t;
/** /**
@ -274,7 +275,7 @@ struct hal_wspi_driver {
osalDbgAssert(((cmdp)->cfg & WSPI_CFG_DATA_MODE_MASK) == \ osalDbgAssert(((cmdp)->cfg & WSPI_CFG_DATA_MODE_MASK) == \
WSPI_CFG_DATA_MODE_NONE, \ WSPI_CFG_DATA_MODE_NONE, \
"data mode specified"); \ "data mode specified"); \
(wspip)->state = WSPI_ACTIVE; \ (wspip)->state = WSPI_SEND; \
wspi_lld_command(wspip, cmdp); \ wspi_lld_command(wspip, cmdp); \
} }
@ -294,7 +295,7 @@ struct hal_wspi_driver {
osalDbgAssert(((cmdp)->cfg & WSPI_CFG_DATA_MODE_MASK) != \ osalDbgAssert(((cmdp)->cfg & WSPI_CFG_DATA_MODE_MASK) != \
WSPI_CFG_DATA_MODE_NONE, \ WSPI_CFG_DATA_MODE_NONE, \
"data mode required"); \ "data mode required"); \
(wspip)->state = WSPI_ACTIVE; \ (wspip)->state = WSPI_SEND; \
wspi_lld_send(wspip, cmdp, n, txbuf); \ wspi_lld_send(wspip, cmdp, n, txbuf); \
} }
@ -314,7 +315,7 @@ struct hal_wspi_driver {
osalDbgAssert(((cmdp)->cfg & WSPI_CFG_DATA_MODE_MASK) != \ osalDbgAssert(((cmdp)->cfg & WSPI_CFG_DATA_MODE_MASK) != \
WSPI_CFG_DATA_MODE_NONE, \ WSPI_CFG_DATA_MODE_NONE, \
"data mode required"); \ "data mode required"); \
(wspip)->state = WSPI_ACTIVE; \ (wspip)->state = WSPI_RECEIVE; \
wspi_lld_receive(wspip, cmdp, n, rxbuf); \ wspi_lld_receive(wspip, cmdp, n, rxbuf); \
} }

View File

@ -94,7 +94,14 @@ static void wspi_lld_serve_interrupt(WSPIDriver *wspip) {
operation. Race condition hidden here.*/ operation. Race condition hidden here.*/
while (dmaStreamGetTransactionSize(wspip->dma) > 0U) while (dmaStreamGetTransactionSize(wspip->dma) > 0U)
; ;
dmaStreamDisable(wspip->dma);
/* Handling of errata: Extra data written in the FIFO at the end of a
read transfer.*/
if (wspip->state == WSPI_RECEIVE) {
while ((wspip->qspi->SR & QUADSPI_SR_BUSY) != 0U) {
(void) wspip->qspi->DR;
}
}
} }
/*===========================================================================*/ /*===========================================================================*/

View File

@ -100,6 +100,8 @@
MEMS Accelerometers. MEMS Accelerometers.
- NEW: Safer messages mechanism for sandboxes (to be backported to 20.3.1). - NEW: Safer messages mechanism for sandboxes (to be backported to 20.3.1).
- NEW: Added latency measurement test application. - NEW: Added latency measurement test application.
- FIX: Fixed STM32 QSPI errata workaround (bug #1116)
(backported to 20.3.2).
- FIX: Fixed wrong condition in STM32 BDMAv1 driver (bug #1115) - FIX: Fixed wrong condition in STM32 BDMAv1 driver (bug #1115)
(backported to 20.3.2). (backported to 20.3.2).
- FIX: Fixed HSI48 not getting enabled on STM32H7 (bug #1114) - FIX: Fixed HSI48 not getting enabled on STM32H7 (bug #1114)

View File

@ -179,4 +179,5 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject> </cproject>