diff options
Diffstat (limited to 'os/hal/ports/STM32/LLD/OTGv1/usb_lld.c')
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/usb_lld.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c index 3bd5f7140..650bc51bb 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c @@ -846,12 +846,16 @@ void usb_lld_start(USBDriver *usbp) { /* PHY enabled.*/
otgp->PCGCCTL = 0;
- /* Internal FS PHY activation.*/
+ /* VBUS sensing and transceiver enabled.*/
+ otgp->GOTGCTL = GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL;
+#if defined(STM32F7XX)
+ otgp->GCCFG = GCCFG_PWRDWN;
+#else
#if defined(BOARD_OTG_NOVBUSSENS)
- otgp->GCCFG = GCCFG_NOVBUSSENS | GCCFG_VBUSASEN | GCCFG_VBUSBSEN |
- GCCFG_PWRDWN;
+ otgp->GCCFG = GCCFG_NOVBUSSENS | GCCFG_PWRDWN;
#else
- otgp->GCCFG = GCCFG_VBUSASEN | GCCFG_VBUSBSEN | GCCFG_PWRDWN;
+ otgp->GCCFG = GCCFG_PWRDWN;
+#endif
#endif
/* Soft core reset.*/
|