Skip to content

Commit f2a01f2

Browse files
committed
STM32: USBPhy: enable HS clock sleep
1 parent 86ee300 commit f2a01f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

targets/TARGET_STM/USBPhy_STM32.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ void USBPhyHw::init(USBPhyEvents *events)
235235

236236
__HAL_RCC_USB_OTG_HS_CLK_ENABLE();
237237
__HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE();
238+
__HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE();
239+
__HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE();
238240
map = PinMap_USB_HS;
239241

240242
#elif (MBED_CONF_TARGET_USB_SPEED == USE_USB_HS_IN_FS)
@@ -298,7 +300,9 @@ void USBPhyHw::init(USBPhyEvents *events)
298300
map++;
299301
}
300302

303+
#if !defined(TARGET_STM32H7)
301304
__HAL_RCC_PWR_CLK_ENABLE();
305+
#endif
302306

303307
#if !defined(TARGET_STM32WB)
304308
__HAL_RCC_SYSCFG_CLK_ENABLE();

0 commit comments

Comments
 (0)