mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
firmware: usb: call USBD_HAL_DISCONNECT while usb init to recover from resets
The firmware doesn't recover from a OSMO_ASSERT() which direct reset the board. After the reset the firmware will waits forever for the USBD state USBD_STATE_CONFIGURED. By adding the explicit USBD_HAL_DISCONNECT the board always recovers. Fixes: OS#5478 Related: SYS#5752 Change-Id: I600a26025166d20b6b27c191f24e4023efdaadf6
This commit is contained in:
committed by
laforge
parent
755387ee31
commit
2ceba0fdc4
@@ -689,6 +689,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_Disconnect();
|
||||
USBD_HAL_Suspend();
|
||||
mdelay(500);
|
||||
USBD_HAL_Activate();
|
||||
|
||||
Reference in New Issue
Block a user