浏览代码

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
 
301
 
302
   uint16_t *ptr;
302
   uint16_t *ptr;
303
 
303
 
304
+  // Disable USB peripheral so we start clean and avoid lockups
305
+  otg_disable();
304
   udd_disable();
306
   udd_disable();
307
+
308
+  // Set the USB interrupt to our stack
305
   UDD_SetStack(&USBD_ISR);
309
   UDD_SetStack(&USBD_ISR);
306
 
310
 
307
   // Start USB stack to authorize VBus monitoring
311
   // Start USB stack to authorize VBus monitoring

正在加载...
取消
保存