Skip to content

Commit 734cacb

Browse files
committed
fix(port/dwc2/usb_glue_st): fix GCCFG in stm32h7rs
Signed-off-by: sakumisu <[email protected]>
1 parent 1f7070f commit 734cacb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

port/dwc2/usb_glue_st.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ uint32_t usbd_get_dwc2_gccfg_conf(uint32_t reg_base)
178178
usb_hsphy_init(25000000U);
179179
return (1 << 23); /* Enable USB HS PHY USBx->GCCFG |= USB_OTG_GCCFG_PHYHSEN;*/
180180
#elif __has_include("stm32h7rsxx.h")
181-
return (1 << 21);
181+
return ((1 << 23) | (1 << 24));
182182
#else
183183
return 0;
184184
#endif
@@ -205,6 +205,8 @@ uint32_t usbh_get_dwc2_gccfg_conf(uint32_t reg_base)
205205
USB_OTG_GLB->GCCFG = (1 << 23);
206206
usb_hsphy_init(25000000U);
207207
return (1 << 23); /* Enable USB HS PHY USBx->GCCFG |= USB_OTG_GCCFG_PHYHSEN;*/
208+
#elif __has_include("stm32h7rsxx.h")
209+
return (1 << 25);
208210
#else
209211
return 0;
210212
#endif

0 commit comments

Comments
 (0)