USB0 initialisation not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB0 initialisation not working

364 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Sat Feb 27 04:26:22 MST 2016
Hello,

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 */
CGU_SetPLL0();
CGU_EnableEntity(CGU_CLKSRC_PLL0, ENABLE);
/* for USB0 Connect the output of PLL1 to USB0 base clock */
CGU_EntityConnect(CGU_CLKSRC_PLL0, CGU_BASE_USB0);
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,
Labels (1)
0 Kudos
2 Replies

317 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Tue Mar 01 01:23:26 MST 2016
Just wanted to know if  I am initializing the USB0 correctly and not missing anything in the sequence in the code that I have shared in previous post.

Anything needs to be checked in HW ?


My device is not self powered USB by the way.

Thanks,


0 Kudos

317 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Feb 29 10:53:54 MST 2016
I believe that there are other threads about this issue, suggest you search the forums.
0 Kudos