From 5233e6676294b010ff85fca352baa7296f45645a Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Sun, 7 Feb 2021 20:46:24 +0000 Subject: [PATCH] Improve RPi host kernel panic mitigation It was still possible to cause a Kernel panic, this additional 500ms delay before disconnect appears to mitigate it completely. --- Marlin/src/HAL/LPC1768/HAL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/LPC1768/HAL.cpp b/Marlin/src/HAL/LPC1768/HAL.cpp index f567f26c9e..26a2c0e7db 100644 --- a/Marlin/src/HAL/LPC1768/HAL.cpp +++ b/Marlin/src/HAL/LPC1768/HAL.cpp @@ -64,8 +64,9 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) { } void flashFirmware(const int16_t) { + delay(500); // Give OS time to disconnect USB_Connect(false); // USB clear connection - delay(2000); // Give OS time to notice + delay(1000); // Give OS time to notice NVIC_SystemReset(); }