File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 9292#if !defined(USB ) && defined(USB_DRD_FS )
9393 #define USB USB_DRD_FS
9494 #define PinMap_USB PinMap_USB_DRD_FS
95- #if defined(STM32U5xx )
95+ #if defined(STM32H5xx ) || defined( STM32U5xx )
9696 #define USB_BASE USB_DRD_BASE
97- #define __HAL_RCC_USB_CLK_ENABLE __HAL_RCC_USB_FS_CLK_ENABLE
98- #define __HAL_RCC_USB_CLK_DISABLE __HAL_RCC_USB_FS_CLK_DISABLE
97+ #if !defined(__HAL_RCC_USB_CLK_ENABLE )
98+ #define __HAL_RCC_USB_CLK_ENABLE __HAL_RCC_USB_FS_CLK_ENABLE
99+ #define __HAL_RCC_USB_CLK_DISABLE __HAL_RCC_USB_FS_CLK_DISABLE
100+ #endif
99101 #endif
100102#endif
101103
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
5858 digitalWriteFast (digitalPinToPinName (PIN_UCPD_TCPP ), LOW );
5959#endif
6060
61- #if defined(PWR_CR2_USV ) || defined(PWR_SVMCR_USV )
61+ #if defined(PWR_CR2_USV ) || defined(PWR_SVMCR_USV ) || defined( PWR_USBSCR_USB33SV )
6262 /* Enable VDDUSB on Pwrctrl CR2 register*/
6363 HAL_PWREx_EnableVddUSB ();
6464#endif
Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ extern "C" {
7474#elif defined(STM32G0xx )
7575#define USB_IRQn USB_UCPD1_2_IRQn
7676#define USB_IRQHandler USB_UCPD1_2_IRQHandler
77+ #elif defined(STM32H5xx )
78+ #define USB_IRQn USB_DRD_FS_IRQn
79+ #define USB_IRQHandler USB_DRD_FS_IRQHandler
7780#elif defined(STM32U5xx ) && !defined(USB_DRD_FS )
7881#define USB_IRQn OTG_FS_IRQn
7982#define USB_IRQHandler OTG_FS_IRQHandler
You can’t perform that action at this time.
0 commit comments