diff options
| author | sakumisu <[email protected]> | 2024-12-16 21:30:26 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-12-16 21:30:26 +0800 |
| commit | effee4d4c28df62edd71e99ea8229d99a2aa055e (patch) | |
| tree | 31877adfac0a5d8fc7a206a397aa6b2d79cc7248 | |
| parent | 05b46c8badef609908ea993c01448328ceb99841 (diff) | |
update(port/dwc2/usb_glue_at): import system_core_clock
| -rw-r--r-- | port/dwc2/usb_glue_at.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/port/dwc2/usb_glue_at.c b/port/dwc2/usb_glue_at.c index 137b1d87..8d45f651 100644 --- a/port/dwc2/usb_glue_at.c +++ b/port/dwc2/usb_glue_at.c @@ -7,6 +7,9 @@ #include "stdint.h" #include "usb_dwc2_reg.h" +extern unsigned int system_core_clock; + +uint32_t SystemCoreClock; /* you can find this config in function: usb_global_init, file:at32fxxx_usb.c, for example: * * usbx->gccfg_bit.pwrdown = TRUE; @@ -17,6 +20,7 @@ uint32_t usbd_get_dwc2_gccfg_conf(uint32_t reg_base) { + SystemCoreClock = system_core_clock; #ifdef CONFIG_USB_HS return ((1 << 16) | (1 << 21)); #else @@ -35,6 +39,7 @@ uint32_t usbd_get_dwc2_gccfg_conf(uint32_t reg_base) uint32_t usbh_get_dwc2_gccfg_conf(uint32_t reg_base) { + SystemCoreClock = system_core_clock; #ifdef CONFIG_USB_HS return ((1 << 16) | (1 << 21)); #else |
