diff options
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r-- | os/hal/platforms/STM32/OTGv1/usb_lld.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 3e50ccfe5..f6287a49c 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -927,6 +927,10 @@ void usb_lld_stop(USBDriver *usbp) { /* If in ready state then disables the USB clock.*/
if (usbp->state != USB_STOP) {
+ /* Disabling all endpoints in case the driver has been stopped while
+ active.*/
+ otg_disable_ep(usbp);
+
usbp->txpending = 0;
otgp->DAINTMSK = 0;
|