Author Topic: USB Port # 2 trouble - LPC 2378  (Read 18773 times)

Offline Vrajesh

  • Newbie
  • *
  • Posts: 1
    • View Profile
USB Port # 2 trouble - LPC 2378
« on: December 13, 2007, 12:30:52 AM »
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

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3243
    • View Profile
    • uTasker
Re: USB Port # 2 trouble - LPC 2378
« Reply #1 on: December 13, 2007, 08:21:51 PM »
Hi Vrajesh

Have you checked the errata to the chip? There are a couple of issues involved with port #1 which may be worked around in the software you are using (the recommendation is to use U1CONNECT and VBUS pins as GPIO rather than as USB function to solve them). The code would possibly then not be suitable when the port #2 is used and these workarounds may have to be removed.

I haven't used the USB ports myself so don't know any more details.

You could post your question on the NXP forums on the links page:
http://www.utasker.com/links.html
these are quite active and you may get a better answer there.


Good luck

Regards

Mark