瀏覽代碼

Mitigate RPi hosts kernel panic on M997

Work around M997 sometimes causing a kernel panic on the host when sent from a Raspbery Pi, the root cause is currently unknown.
Chris Pepper 4 年之前
父節點
當前提交
004bed8a7f
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      Marlin/src/HAL/LPC1768/HAL.cpp

+ 5
- 1
Marlin/src/HAL/LPC1768/HAL.cpp 查看文件

@@ -63,7 +63,11 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) {
63 63
   return ind > -1 ? ind : dval;
64 64
 }
65 65
 
66
-void flashFirmware(const int16_t) { NVIC_SystemReset(); }
66
+void flashFirmware(const int16_t) {
67
+  USB_Connect(FALSE);  // USB clear connection
68
+  delay(2000);         // Give OS time to notice
69
+  NVIC_SystemReset();
70
+}
67 71
 
68 72
 void HAL_clear_reset_source(void) {
69 73
   TERN_(USE_WATCHDOG, watchdog_clear_timeout_flag());

Loading…
取消
儲存