diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/STM32/OTGv1/usb_lld.c | 5 | ||||
-rw-r--r-- | os/hal/ports/STM32F4xx/hal_lld.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/OTGv1/usb_lld.c b/os/hal/ports/STM32/OTGv1/usb_lld.c index 433a75802..ce60435f9 100644 --- a/os/hal/ports/STM32/OTGv1/usb_lld.c +++ b/os/hal/ports/STM32/OTGv1/usb_lld.c @@ -773,7 +773,12 @@ void usb_lld_start(USBDriver *usbp) { otgp->PCGCCTL = 0;
/* Internal FS PHY activation.*/
+#if defined(BOARD_OTG_NOVBUSSENS)
+ otgp->GCCFG = GCCFG_NOVBUSSENS | GCCFG_VBUSASEN | GCCFG_VBUSBSEN |
+ GCCFG_PWRDWN;
+#else
otgp->GCCFG = GCCFG_VBUSASEN | GCCFG_VBUSBSEN | GCCFG_PWRDWN;
+#endif
/* Soft core reset.*/
otg_core_reset(usbp);
diff --git a/os/hal/ports/STM32F4xx/hal_lld.h b/os/hal/ports/STM32F4xx/hal_lld.h index 1729b687b..4bbf9f16b 100644 --- a/os/hal/ports/STM32F4xx/hal_lld.h +++ b/os/hal/ports/STM32F4xx/hal_lld.h @@ -818,9 +818,7 @@ #error "HSI not enabled, required by STM32_MCO1SEL"
#endif
-#if (STM32_MCO2SEL == STM32_MCO2SEL_HSI) || \
- ((STM32_MCO2SEL == STM32_MCO2SEL_PLL) && \
- (STM32_PLLSRC == STM32_PLLSRC_HSI))
+#if (STM32_MCO2SEL == STM32_MCO2SEL_PLL) && (STM32_PLLSRC == STM32_PLLSRC_HSI)
#error "HSI not enabled, required by STM32_MCO2SEL"
#endif
|