summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Bonnes <[email protected]>2020-07-02 19:40:32 +0200
committerUwe Bonnes <[email protected]>2020-07-03 10:53:51 +0200
commit5c24d5ca72d6657b1be03ded699fdf525abb0525 (patch)
treea0fc373f08108760638115d7a04bcdda42a298e6
parent4b7539bd6320cc6659fe458e91a51ffb7896f45c (diff)
stm32h745disco: HAL_PWREx_EnableUSBVoltageDetector() is needed for hot replug.
-rw-r--r--hw/bsp/stm32h745disco/stm32h745disco.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/bsp/stm32h745disco/stm32h745disco.c b/hw/bsp/stm32h745disco/stm32h745disco.c
index ce4034af0..d4fcdbfc0 100644
--- a/hw/bsp/stm32h745disco/stm32h745disco.c
+++ b/hw/bsp/stm32h745disco/stm32h745disco.c
@@ -263,8 +263,7 @@ void board_init(void)
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
// https://community.st.com/s/question/0D50X00009XkYZLSA3/stm32h7-nucleo-usb-fs-cdc
- // TODO: Board init actually works fine without this line.
-// HAL_PWREx_EnableUSBVoltageDetector();
+ HAL_PWREx_EnableUSBVoltageDetector();
__HAL_RCC_USB2_OTG_FS_CLK_ENABLE();
// Enable VBUS sense (B device) via pin PA9