mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-19 23:08:34 +03:00
Call USBD_Disconnect before software-triggered CPU reset
This makes sure that we'll re-enumerate on the USB, as a CPU reset apparently doesn't automatically release the pull-up and notify the hub that we were gone?
This commit is contained in:
@@ -154,6 +154,7 @@ extern int main(void)
|
||||
if (i >= MAX_USB_ITER * 3) {
|
||||
TRACE_ERROR("Resetting board (USB could "
|
||||
"not be configured)\n\r");
|
||||
USBD_Disconnect();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -161,6 +161,7 @@ extern int main(void)
|
||||
if (i >= MAX_USB_ITER * 3) {
|
||||
TRACE_ERROR("Resetting board (USB could "
|
||||
"not be configured)\n\r");
|
||||
USBD_Disconnect();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -154,6 +154,7 @@ extern int main(void)
|
||||
if (i >= MAX_USB_ITER * 3) {
|
||||
TRACE_ERROR("Resetting board (USB could "
|
||||
"not be configured)\r\n");
|
||||
USBD_Disconnect();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user