Thanks Alexis,
But I have a different custom board designed for this project. I have to configure U2,
In which P3.24 is VBUS, P0.31 is D+2, Pin 37 is D-2, P1.30 is USB_PWRD2, P1.31 is USB_OVRCR2.
In datasheet what does it means USB Port Select register (USBPortSel - 0xFFE0 C110 – LPC2378 only)
void USB_Init (void)
{
PINSEL1 |= 0X40000000;//USB_D+2
PINSEL1 = (PINSEL1 & ~(1<<30))|(2<<30);
Don't know how to configure USB_D-2 Pin
PINSEL7 |= 0X00; // VBUS
PCONP |= (1<<31);
USBPortSel = 0X3; // the U2 port:USB_CONNECT2, USB_UP_LED2, USB_D+2, USB_D-2.
USBClkCtrl = 0x12; /* Dev clock, AHB clock enable */
while ((USBClkSt & 0x12) != 0x12)
VICVectAddr22 = (unsigned long)USB_ISR; /* USB Interrupt -> Vector 22 */
VICVectCntl22 = 0x01; /* USB Interrupt -> Priority 1 */
VICIntEnable = 1 << 22; /* Enable USB Interrupt */
USB_Reset();
USB_SetAddress(0);
}
can you please suggest, what I am missing.