From f1b6b4bdaa1093e152acace7fd903907810ac797 Mon Sep 17 00:00:00 2001
From: Thomas Moore <tcm0116@gmail.com>
Date: Fri, 29 Sep 2017 08:21:33 -0500
Subject: [PATCH] Fix LPC1768 USB interrupt priority

---
 frameworks/CMSIS/LPC1768/lib/usb/usbhw.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/frameworks/CMSIS/LPC1768/lib/usb/usbhw.cpp b/frameworks/CMSIS/LPC1768/lib/usb/usbhw.cpp
index f16f360a80..8fa8f829e9 100644
--- a/frameworks/CMSIS/LPC1768/lib/usb/usbhw.cpp
+++ b/frameworks/CMSIS/LPC1768/lib/usb/usbhw.cpp
@@ -153,6 +153,7 @@ void USB_Init (void) {
   while ((LPC_USB->USBClkSt & 0x1A) != 0x1A);
 
   NVIC_EnableIRQ(USB_IRQn);               /* enable USB interrupt */
+  NVIC_SetPriority(USB_IRQn, NVIC_EncodePriority(0, 5, 0));
 
   USB_Reset();
   USB_SetAddress(0);
-- 
GitLab