Ver código fonte

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 anos atrás
pai
commit
c5730cf711
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4
    0
      Marlin/src/HAL/HAL_DUE/usb/usb_task.c

+ 4
- 0
Marlin/src/HAL/HAL_DUE/usb/usb_task.c Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar