Skip to content

Commit 4e4dfbd

Browse files
committed
core: USB: add STM32U5xx support
Signed-off-by: Frederic Pillon <[email protected]>
1 parent cbda9d1 commit 4e4dfbd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cores/arduino/stm32/usb/usbd_conf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PCD_HandleTypeDef g_hpcd;
5151
void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
5252
{
5353
const PinMap *map = NULL;
54-
#if defined(PWR_CR2_USV)
54+
#if defined(PWR_CR2_USV) || defined(PWR_SVMCR_USV)
5555
/* Enable VDDUSB on Pwrctrl CR2 register*/
5656
HAL_PWREx_EnableVddUSB();
5757
#endif
@@ -136,8 +136,10 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
136136
#ifdef __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_EDGE
137137
__HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_EDGE();
138138
#endif
139+
#ifdef __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_IT
139140
__HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_IT();
140-
#if !defined(STM32L4xx)
141+
#endif
142+
#if !defined(STM32L4xx) && !defined(STM32U5xx)
141143
/* Set EXTI Wakeup Interrupt priority */
142144
HAL_NVIC_SetPriority(OTG_FS_WKUP_IRQn, USBD_IRQ_PRIO, USBD_IRQ_SUBPRIO);
143145

0 commit comments

Comments
 (0)