Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-07-18 16:44:37 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-07-18 16:44:37 +0300
commit2b22b70497909e8064f1ac18b730477bcce9723e (patch)
treef22c2bf672cedd46d01bfed7a1c5104ffe09f094 /src/Networking
parent4a555b81bb5acba8bc7274e0f12db7ec8b490ac7 (diff)
Fixes for cache on Duet Mini
Diffstat (limited to 'src/Networking')
-rw-r--r--src/Networking/ESP8266WiFi/WiFiInterface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Networking/ESP8266WiFi/WiFiInterface.cpp b/src/Networking/ESP8266WiFi/WiFiInterface.cpp
index eaaa7cf3..1303b8bc 100644
--- a/src/Networking/ESP8266WiFi/WiFiInterface.cpp
+++ b/src/Networking/ESP8266WiFi/WiFiInterface.cpp
@@ -1749,6 +1749,8 @@ int32_t WiFiInterface::SendCommand(NetworkCommand cmd, SocketNumber socketNum, u
espWaitingTask = TaskBase::GetCallerTaskHandle();
transferPending = true;
+ Cache::FlushBeforeDMASend(&bufferIn, sizeof(bufferIn));
+
#if SAME5x
spi_slave_dma_setup(dataOutLength, dataInLength);
WiFiSpiSercom->SPI.INTFLAG.reg = 0xFF; // clear any pending interrupts
@@ -1791,6 +1793,8 @@ int32_t WiFiInterface::SendCommand(NetworkCommand cmd, SocketNumber socketNum, u
}
} while (transferPending);
+ espWaitingTask = nullptr;
+
#if SAME5x
{
// We don't get and end-of-transfer interrupt, just a start-of-transfer one. So wait until SS is high, then disable the SPI.
@@ -1814,6 +1818,7 @@ int32_t WiFiInterface::SendCommand(NetworkCommand cmd, SocketNumber socketNum, u
#else
while (!spi_dma_check_rx_complete()) { } // Wait for DMA to complete
#endif
+
Cache::InvalidateAfterDMAReceive(&bufferIn, sizeof(bufferIn));
// Look at the response