lpc176x: force minimum usb disconnect time

Fixes GitHub Issue #1499. Resolves USB hang by forcing a minimum
USB disconnection time at boot.

Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
This commit is contained in:
Matt Baker
2019-04-06 15:12:51 -07:00
committed by KevinOConnor
parent 04adde9a02
commit e83071c9fe
3 changed files with 19 additions and 0 deletions

View File

@@ -277,6 +277,8 @@ usbserial_init(void)
gpio_peripheral(GPIO(0, 30), 1, 0);
gpio_peripheral(GPIO(0, 29), 1, 0);
gpio_peripheral(GPIO(2, 9), 1, 0);
// enforce a minimum time bus is disconnected before connecting
udelay(5000);
// setup endpoints
realize_endpoint(EP0OUT, USB_CDC_EP0_SIZE);
realize_endpoint(EP0IN, USB_CDC_EP0_SIZE);