check for PWR_USBSCR_USB33DEN before enabling USB VDD
This commit is contained in:
@@ -115,10 +115,6 @@ static inline void SystemClock_Config(void) {
|
||||
__HAL_RCC_USB_CLK_ENABLE();
|
||||
}
|
||||
|
||||
static inline void board_enable_vdd_usb(void) {
|
||||
// USB in STM32H503RB does not require enabling VDD
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -122,10 +122,6 @@ static inline void SystemClock_Config(void) {
|
||||
__HAL_RCC_USB_CLK_ENABLE();
|
||||
}
|
||||
|
||||
static inline void board_enable_vdd_usb(void) {
|
||||
/* Enable VDDUSB to power on USB peripheral */
|
||||
HAL_PWREx_EnableVddUSB();
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -108,11 +108,6 @@ static inline void SystemClock_Config(void) {
|
||||
__HAL_RCC_USB_CLK_ENABLE();
|
||||
}
|
||||
|
||||
static inline void board_enable_vdd_usb(void) {
|
||||
/* Enable VDDUSB to power on USB peripheral */
|
||||
HAL_PWREx_EnableVddUSB();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -145,7 +145,9 @@ void board_init(void) {
|
||||
__HAL_RCC_USB_CLK_ENABLE();
|
||||
|
||||
/* Enable VDDUSB */
|
||||
board_enable_vdd_usb();
|
||||
#if defined (PWR_USBSCR_USB33DEN)
|
||||
HAL_PWREx_EnableVddUSB();
|
||||
#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
Reference in New Issue
Block a user