USB0 initialisation not working

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by pra18 on Sat Feb 27 04:26:22 MST 2016

I have a working USB1 driver on my custom board and I am trying  to migrate it to the USB0 now Though it seems to be pretty straightforward, I am not able to get it up and running on USB0 .

I am trying to do the following initialisation.

/*Set up USB0 */
/* for USB0 Connect the output of PLL1 to USB0 base clock */
scu_pinmux(0x2, 3, MD_PUP | MD_EZI, FUNC7);     // P2_3 USB0_PWR_EN, USB0 VBus function

Am I missing anything in the sequence above or is there some configuration error?

I am setting up descriptors for USB0 as below.

/* Setup  the USB device descriptors */
  USBDesc.device_desc = (uint8_t *) USB_DeviceDescriptor;
  USBDesc.string_desc = (uint8_t *) USB_StringDescriptor;
  USBDesc.high_speed_desc = USB_HsConfigDescriptor;
  USBDesc.full_speed_desc = USB_FsConfigDescriptor;
  USBDesc.device_qualifier = (uint8_t *) USB_DeviceQualifier;

I am turning on the PHY before  USBD_API->hw->Init call()  also.

/* Turn on the USB0 phy */   
  LPC_CREG->CREG0 &= ~(1<<5);         
After all these steps, still I am not finding atleast an Unknown device " or a Virtual COM on the PC .

Can anyone help me in this?

Thanks in advance,