mirror of
https://github.com/sakumisu/CherryUSB.git
synced 2025-05-08 16:18:44 +08:00
update(port/dwc2/usb_dc_dwc2): clear crst bit because some mcu cannot be self-clearing, refs:#276
This commit is contained in:
parent
82a0d243f8
commit
1a39169f6e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user