Skip to content

Commit

Permalink
update(port/dwc2/usb_dc_dwc2): clear crst bit because some mcu cannot…
Browse files Browse the repository at this point in the history
… be self-clearing, refs:#276
  • Loading branch information
sakumisu committed Nov 25, 2024
1 parent 82a0d24 commit 1a39169
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion port/dwc2/usb_dc_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1a39169

Please sign in to comment.