firmware: increase reset delay before usb reattach

The previous value was way too low and led to reenumeration issues when
switching from app to bl because the hosts are fairly lenient and
feature long delays until they accept disappearing devices as gone for
good instead of ignoring a presuambly flaky usb cable or connection.

Related: SYS5061
Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
This commit is contained in:
Eric Wild 2021-10-28 18:17:00 +02:00
parent f83d42ce51
commit a079e2b4ee
2 changed files with 2 additions and 2 deletions

View File

@ -342,7 +342,7 @@ extern int main(void)
TRACE_INFO("USB init...\n\r");
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
USBD_Disconnect();
mdelay(50);
mdelay(500);
USBDFU_Initialize(&dfu_descriptors);
while (USBD_GetState() < USBD_STATE_CONFIGURED) {

View File

@ -690,7 +690,7 @@ void SIMtrace_USB_Initialize(void)
unsigned int i;
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
USBD_HAL_Suspend();
mdelay(20);
mdelay(500);
USBD_HAL_Activate();
// Get std USB driver