aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c')
-rw-r--r--os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
index 0618d83..523f14d 100644
--- a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
+++ b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
@@ -1386,12 +1386,20 @@ static void _usbh_start(USBHDriver *usbh) {
otgp->PCGCCTL = 0;
/* Internal FS PHY activation.*/
+#if STM32_OTG_STEPPING == 1
#if defined(BOARD_OTG_NOVBUSSENS)
otgp->GCCFG = GCCFG_NOVBUSSENS | GCCFG_PWRDWN;
#else
otgp->GCCFG = GCCFG_PWRDWN;
#endif
+#elif STM32_OTG_STEPPING == 2
+#if defined(BOARD_OTG_NOVBUSSENS)
+ otgp->GCCFG = GCCFG_PWRDWN;
+#else
+ otgp->GCCFG = (GCCFG_VBDEN | GCCFG_PWRDWN);
+#endif
+#endif
/* 48MHz 1.1 PHY.*/
otgp->HCFG = HCFG_FSLSS | HCFG_FSLSPCS_48;