Skip to content

Commit

Permalink
usb/dwc: Guard reset interrupt handling to STM32H7 only so late handl…
Browse files Browse the repository at this point in the history
…ing doesn't deconfigure all endpoints wrongly
  • Loading branch information
sidprice committed Aug 24, 2024
1 parent 8e00dd0 commit 74413d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/usb/usb_dwc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,14 @@ void dwc_poll(usbd_device *usbd_dev)
_usbd_reset(usbd_dev);
return;
}
#if defined(STM32H7)
if (intsts & OTG_GINTSTS_USBRST) {
/* Handle the /other/ USB Reset condition */
REBASE(OTG_GINTSTS) = OTG_GINTSTS_USBRST | OTG_GINTSTS_RSTDET;
dwc_endpoints_reset(usbd_dev);
return;
}
#endif

/*
* There is not always a global interrupt flag for transmit complete.
Expand Down

0 comments on commit 74413d9

Please sign in to comment.