diff --git a/lib/usb/usb_f107.c b/lib/usb/usb_f107.c index fb8ddf5b..924ac3a6 100644 --- a/lib/usb/usb_f107.c +++ b/lib/usb/usb_f107.c @@ -52,6 +52,7 @@ const struct _usbd_driver stm32f107_usb_driver = { /** Initialize the USB device controller hardware of the STM32. */ static usbd_device *stm32f107_usbd_init(void) { + rcc_periph_clock_enable(RCC_OTGFS); OTG_FS_GINTSTS = OTG_GINTSTS_MMIS; OTG_FS_GUSBCFG |= OTG_GUSBCFG_PHYSEL; diff --git a/lib/usb/usb_f207.c b/lib/usb/usb_f207.c index fb7dcb5b..7a940c72 100644 --- a/lib/usb/usb_f207.c +++ b/lib/usb/usb_f207.c @@ -52,6 +52,7 @@ const struct _usbd_driver stm32f207_usb_driver = { /** Initialize the USB device controller hardware of the STM32. */ static usbd_device *stm32f207_usbd_init(void) { + rcc_periph_clock_enable(RCC_OTGHS); OTG_HS_GINTSTS = OTG_GINTSTS_MMIS; OTG_HS_GUSBCFG |= OTG_GUSBCFG_PHYSEL;