update(port/dwc2/usb_dc_dwc2): clear crst bit because some mcu cannot be self-clearing, refs:#276

This commit is contained in:
sakumisu 2024-11-25 21:03:51 +08:00
parent 82a0d243f8
commit 1a39169f6e

View File

@ -136,10 +136,12 @@ static inline int dwc2_reset(uint8_t busid)
do {
if (++count > 200000U) {
return -1;
break;
}
} while ((USB_OTG_GLB->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);
USB_OTG_GLB->GRSTCTL &= ~USB_OTG_GRSTCTL_CSRST;
return 0;
}