We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6bfab2 commit 14de4e5Copy full SHA for 14de4e5
cores/arduino/stm32/usb/usbd_conf.c
@@ -19,6 +19,7 @@
19
#ifdef USBCON
20
/* Includes ------------------------------------------------------------------*/
21
#include "usbd_core.h"
22
+#include "stm32yyxx_ll_pwr.h"
23
24
#ifndef HAL_PCD_MODULE_ENABLED
25
#error "HAL_PCD_MODULE_ENABLED is required"
@@ -52,6 +53,11 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
52
53
HAL_PWREx_EnableVddUSB();
54
}
55
#endif
56
+#ifdef STM32H7xx
57
+ if(!LL_PWR_IsActiveFlag_USB()) {
58
+ HAL_PWREx_EnableUSBVoltageDetector();
59
+ }
60
+#endif
61
#if defined (USB)
62
if(hpcd->Instance == USB) {
63
0 commit comments