瀏覽代碼

As Bob-The-Khun suggested, resetting the USB peripheral solves the huge startup delays that happen when a WDT reset happens and we are connected through the native port

etagle 7 年之前
父節點
當前提交
c5730cf711
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      Marlin/src/HAL/HAL_DUE/usb/usb_task.c

+ 4
- 0
Marlin/src/HAL/HAL_DUE/usb/usb_task.c 查看文件

@@ -301,7 +301,11 @@ void usb_task_init(void) {
301 301
 
302 302
   uint16_t *ptr;
303 303
 
304
+  // Disable USB peripheral so we start clean and avoid lockups
305
+  otg_disable();
304 306
   udd_disable();
307
+
308
+  // Set the USB interrupt to our stack
305 309
   UDD_SetStack(&USBD_ISR);
306 310
 
307 311
   // Start USB stack to authorize VBus monitoring

Loading…
取消
儲存