diff options
Diffstat (limited to 'os')
| -rw-r--r-- | os/hal/platforms/STM32/OTGv1/usb_lld.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 36ef53298..a33f7810d 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -479,6 +479,9 @@ void usb_lld_start(USBDriver *usbp) { /* Soft core reset.*/
otg_core_reset();
+ /* Internal FS PHY activation.*/
+ OTG->GCCFG = GCCFG_PWRDWN;
+
/* - Forced device mode.
- USB turn-around time = TRDT_VALUE.
- Full Speed 1.1 PHY.*/
@@ -528,6 +531,7 @@ void usb_lld_stop(USBDriver *usbp) { }
#endif
}
+ OTG->GCCFG = 0;
}
/**
@@ -720,9 +724,7 @@ usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep) { */
void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf) {
- (void)usbp;
- (void)ep;
- (void)buf;
+ memcpy(buf, usbp->epc[ep]->setup_buf, 8);
}
/**
|
