Some people report that USB1 is not working in the current MQX releases for Vybrid.
We found that this may be caused by the Bypass bit in the USB1 PLL (PLL7) not being cleared during initialization.
The issue will be further investigated, but for now a quick fix is to clear the bypass by adding the code in bold.:
In file init_gpio.c (bsp lib):
// For USB1
Anadig_PLL7_CTRL &= ~Anadig_PLL7_CTRL_BYPASS_CLK_SRC_MASK; //the source of clock is 24MHz XTAL CLK
Anadig_PLL7_CTRL |= Anadig_PLL7_CTRL_POWER_MASK; //power the USB1 PLL
Anadig_PLL7_CTRL |= Anadig_PLL7_CTRL_EN_USB_CLKS_MASK; //power the USB1 PHY
while(!(Anadig_PLL7_CTRL & Anadig_PLL7_CTRL_LOCK_MASK));// wait for pll to lock
Anadig_PLL7_CTRL &= ~Anadig_PLL7_CTRL_BYPASS_MASK; //clear the bypass
Best regards,
Richard