File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
components/drivers/usb/cherryusb/port/dwc2 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 88#include "usb_dwc2_param.h"
99#include "rtthread.h"
1010#include "cybsp.h"
11+ #include "cy_device.h"
1112
1213#if defined (COMPONENT_CM55 )
1314
14- #if defined( CONFIG_USB_DWC2_DMA_ENABLE ) && !defined(CONFIG_USB_DCACHE_ENABLE )
15+ #if !defined(CONFIG_USB_DCACHE_ENABLE )
1516#error "Please enable CONFIG_USB_DCACHE_ENABLE and put USB_NOCACHE_RAM_SECTION to section ".cy_socmem_data" when using DMA"
1617#endif
17-
1818#else
1919#define CONFIG_USB_DWC2_DMA_ENABLE
2020#endif
@@ -83,6 +83,8 @@ void usb_dc_low_level_init(uint8_t busid)
8383 USBHS_SS -> PHY_FUNC_CTL_1 |= (7 << USBHS_SS_PHY_FUNC_CTL_1_PLL_FSEL_Pos );
8484 USBHS_SS -> PHY_FUNC_CTL_2 |= (USBHS_SS_PHY_FUNC_CTL_2_RES_TUNING_SEL_Msk | USBHS_SS_PHY_FUNC_CTL_2_EFUSE_SEL_Msk );
8585
86+ rt_thread_mdelay (200 ); /* Wait for PHY stable */
87+
8688 cy_stc_sysint_t usb_int_cfg = {
8789 .intrSrc = usbhs_interrupt_usbhsctrl_IRQn ,
8890 .intrPriority = 3
@@ -120,6 +122,8 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
120122 USBHS_SS -> PHY_FUNC_CTL_1 |= (7 << USBHS_SS_PHY_FUNC_CTL_1_PLL_FSEL_Pos );
121123 USBHS_SS -> PHY_FUNC_CTL_2 |= (USBHS_SS_PHY_FUNC_CTL_2_RES_TUNING_SEL_Msk | USBHS_SS_PHY_FUNC_CTL_2_EFUSE_SEL_Msk );
122124
125+ rt_thread_mdelay (200 ); /* Wait for PHY stable */
126+
123127 cy_stc_sysint_t usb_int_cfg = {
124128 .intrSrc = usbhs_interrupt_usbhsctrl_IRQn ,
125129 .intrPriority = 3
You can’t perform that action at this time.
0 commit comments