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-09-07 18:27:17 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-09-07 18:27:17 +0300
commit3700d39c9276a4cfd6f5ea7d17e982b7d79398f9 (patch)
treea756f5baae5dd9b67d51ffb14bdf1f6a1d78ef5f /src/Hardware
parent78593ec1d7141949f7597590bd12bf12e12619ca (diff)
Disable GMAC transmit and receive when shutting down Ethernet
Diffstat (limited to 'src/Hardware')
-rw-r--r--src/Hardware/SAME5x/Ethernet/GmacInterface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Hardware/SAME5x/Ethernet/GmacInterface.cpp b/src/Hardware/SAME5x/Ethernet/GmacInterface.cpp
index 5a8e61bb..68560504 100644
--- a/src/Hardware/SAME5x/Ethernet/GmacInterface.cpp
+++ b/src/Hardware/SAME5x/Ethernet/GmacInterface.cpp
@@ -786,6 +786,8 @@ void ethernetif_set_mac_address(const uint8_t macAddress[]) noexcept
// This is called when we shut down
void ethernetif_terminate() noexcept
{
+ gmac_enable_transmit(GMAC, false);
+ gmac_enable_receive(GMAC, false);
NVIC_DisableIRQ(GMAC_IRQn);
ethernetTask.TerminateAndUnlink();
}