From f77cc7962a79043f892d1b1dada3cb5a7a864286 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 7 Mar 2021 08:13:13 +0000 Subject: [PATCH] Tentative fix for bug #1147. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14061 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/LLD/QUADSPIv1/hal_wspi_lld.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os/hal/ports/STM32/LLD/QUADSPIv1/hal_wspi_lld.c b/os/hal/ports/STM32/LLD/QUADSPIv1/hal_wspi_lld.c index 678339a02..64f2522f1 100644 --- a/os/hal/ports/STM32/LLD/QUADSPIv1/hal_wspi_lld.c +++ b/os/hal/ports/STM32/LLD/QUADSPIv1/hal_wspi_lld.c @@ -95,6 +95,10 @@ static void wspi_lld_serve_interrupt(WSPIDriver *wspip) { while (dmaStreamGetTransactionSize(wspip->dma) > 0U) ; + /* Clearing DMA interrupts here because the DMA ISR is not called on + transfer complete.*/ + dmaStreamClearInterrupt(wspip->dma); + /* Handling of errata: Extra data written in the FIFO at the end of a read transfer.*/ if (wspip->state == WSPI_RECEIVE) {