Skip to content

Commit 14de4e5

Browse files
committed
[USB] Fix H7 issue of missing VDD33USB
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent b6bfab2 commit 14de4e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cores/arduino/stm32/usb/usbd_conf.c

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifdef USBCON
2020
/* Includes ------------------------------------------------------------------*/
2121
#include "usbd_core.h"
22+
#include "stm32yyxx_ll_pwr.h"
2223

2324
#ifndef HAL_PCD_MODULE_ENABLED
2425
#error "HAL_PCD_MODULE_ENABLED is required"
@@ -52,6 +53,11 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
5253
HAL_PWREx_EnableVddUSB();
5354
}
5455
#endif
56+
#ifdef STM32H7xx
57+
if(!LL_PWR_IsActiveFlag_USB()) {
58+
HAL_PWREx_EnableUSBVoltageDetector();
59+
}
60+
#endif
5561
#if defined (USB)
5662
if(hpcd->Instance == USB) {
5763

0 commit comments

Comments
 (0)