stm32h7: Enable USB peripheral (device does not enumerate yet).
This commit is contained in:
@@ -21,7 +21,8 @@ SRC_C += \
|
||||
hw/mcu/st/stm32lib/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \
|
||||
hw/mcu/st/stm32lib/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c \
|
||||
hw/mcu/st/stm32lib/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c \
|
||||
hw/mcu/st/stm32lib/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c
|
||||
hw/mcu/st/stm32lib/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c \
|
||||
hw/mcu/st/stm32lib/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c
|
||||
|
||||
SRC_S += \
|
||||
hw/mcu/st/startup/stm32h7/startup_stm32h743xx.s
|
||||
|
||||
@@ -163,6 +163,11 @@ void board_init(void)
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(LED_PORT, &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_RCC_USB2_OTG_FS_CLK_ENABLE();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user