mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13780 from JojoS62/PR-fix-H7-USB
STM32 H7: fix USB in sleep modepull/13973/head
commit
c9ff692858
|
@ -247,6 +247,14 @@ void USBPhyHw::init(USBPhyEvents *events)
|
|||
hpcd.Init.use_external_vbus = DISABLE;
|
||||
|
||||
__HAL_RCC_USB_OTG_HS_CLK_ENABLE();
|
||||
|
||||
#ifdef __HAL_RCC_USB1_OTG_FS_ULPI_CLK_SLEEP_DISABLE
|
||||
__HAL_RCC_USB1_OTG_FS_ULPI_CLK_SLEEP_DISABLE();
|
||||
#endif
|
||||
#ifdef __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE
|
||||
__HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE();
|
||||
#endif
|
||||
|
||||
map = PinMap_USB_HS;
|
||||
|
||||
#elif (MBED_CONF_TARGET_USB_SPEED == USE_USB_OTG_FS)
|
||||
|
@ -256,6 +264,14 @@ void USBPhyHw::init(USBPhyEvents *events)
|
|||
hpcd.Init.speed = PCD_SPEED_FULL;
|
||||
|
||||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
||||
|
||||
#ifdef __HAL_RCC_USB1_OTG_FS_ULPI_CLK_SLEEP_DISABLE
|
||||
__HAL_RCC_USB1_OTG_FS_ULPI_CLK_SLEEP_DISABLE();
|
||||
#endif
|
||||
#ifdef __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE
|
||||
__HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE();
|
||||
#endif
|
||||
|
||||
map = PinMap_USB_FS;
|
||||
|
||||
#elif (MBED_CONF_TARGET_USB_SPEED == USE_USB_NO_OTG)
|
||||
|
|
Loading…
Reference in New Issue