From f3bf301825db5fd8bfa369d26584a64f5d640ecb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 16 Dec 2019 16:33:48 +0000 Subject: [PATCH] Disable usb on slave half to resolve random 'lockup' (#7649) --- quantum/split_common/split_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9366c3297a..076f186649 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -33,9 +33,11 @@ bool waitForUsb(void) { wait_ms(100); } -#if defined(__AVR__) // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow +#if defined(__AVR__) (USBCON &= ~(_BV(USBE) | _BV(OTGPADE))); +#else + usbStop(&USBD1); #endif return false;