Hey Guys-
I am using Keil''s Demo board MCB2300 on which the USB port used is port # 1 However, on our alpha boards we have hooked up USB Port # 2 for USB communication.
However, I am not able to get the port up and running, even after setting register
PCONP |= 0x80000000; /* USB PCLK -> enable USB Per. */
OTG_CLK_CTRL = 0x12; /* Dev clock, AHB clock enable */
while ((OTG_CLK_STAT & 0x12) != 0x12);
OTG_CLK_CTRL = (OTG_CLK_STAT | 0x8); /* Dev clock, AHB clock enable */
while ((OTG_CLK_STAT & (0x1a)) != (0x1a));
USBPortSel = 0x03;
while (USBPortSel != 0x03)
USBPortSel = 0x03;
I have read the manual several times, and I do not think I am missing anything. But it maybe possible that I am missing some bit or register somewhere.
However, the same code works if I enable USB Port # 1.
thanx
Vrajesh