Browse Source

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 years ago
parent
commit
c5730cf711
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Marlin/src/HAL/HAL_DUE/usb/usb_task.c

+ 4
- 0
Marlin/src/HAL/HAL_DUE/usb/usb_task.c View File

@@ -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…
Cancel
Save