This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB device is not recognized (LPC3250)

Hi,

I have downloade the USB HID code of 3180 and configured it 3250
ics.nxp.com/.../code.bundle.lpc3180.keil.zip

I have seen a thread regarding this "USB implementation in LPC3250".I am facing the same problem like "USB DEVICE IS NOT RECOGNIZED" It is not enumerated in the PC.

I would like to know how it is(or can be) resolved?

Also it says "SDRAM ***MUST*** be initialised for USB sample code to work". I did not get how it need to be initialized also.

Thanks in advance.

Parents
  • I have seen a thread regarding this "USB implementation in LPC3250".

    I assume you're talking of the thread: http://www.keil.com/forum/19122/

    What I stated there was that the NXP example code package worked when used with the LPC3250 (with a minor modification to match our custom board).

    Also it says "SDRAM ***MUST*** be initialised for USB sample code to work". I did not get how it need to be initialized also.

    The LPC3250 application requires access to a suitable amount of RAM. The Phytec board (and our custom board) have SDRAM fitted. That SDRAM must be initialised before entry to the application. If you're running the application in the debugger, this initialisation can be done using the .ini file. If you're running the application normally, this initialisation could be done as part of the boot sequence.

    Of course, you could consider using the USB facility provided by MDK-ARM. It now has support for the LPC3250.

Reply
  • I have seen a thread regarding this "USB implementation in LPC3250".

    I assume you're talking of the thread: http://www.keil.com/forum/19122/

    What I stated there was that the NXP example code package worked when used with the LPC3250 (with a minor modification to match our custom board).

    Also it says "SDRAM ***MUST*** be initialised for USB sample code to work". I did not get how it need to be initialized also.

    The LPC3250 application requires access to a suitable amount of RAM. The Phytec board (and our custom board) have SDRAM fitted. That SDRAM must be initialised before entry to the application. If you're running the application in the debugger, this initialisation can be done using the .ini file. If you're running the application normally, this initialisation could be done as part of the boot sequence.

    Of course, you could consider using the USB facility provided by MDK-ARM. It now has support for the LPC3250.

Children
  • Yes,I was talking about http://www.keil.com/forum/19122/

    Steps what I configured

    1. I took the \ARM\Boards\Phytec\LPC3250\Blinky Ext_SDRAM.ini file to initialize SDRAM.Hope that would be sufficient!
    2. Replaced Startup.s with LPC32x0.s file.
    3. Device adress 0x58 is not working.So

    #define OTG_1301_DEV_ADDR 0x5A
    

    is used.

    When the program is debugged, I could see device is powered via ISP1301 command settings and the host detects an Unknown Device connected.
    But the enumeration call in EndPoint0 is not processed. I doubt if the Interrupt handling is not happening or some other problems.

    Also I assume since it is HID no particular host driver in the computer is required to detect it,default is sufficient.Even HIDclient.exe is not recognizing.

    A suggestion for any work around or solution is most appreciable.

    Thanks.

  • "1. I took the \ARM\Boards\Phytec\LPC3250\Blinky Ext_SDRAM.ini file to initialize SDRAM.Hope that would be sufficient!"

    Hope should have nothing to do with it! See what is being configured and adjust as appropriate. Different SDRAM devices frequently require different configuration details.

    "2. Replaced Startup.s with LPC32x0.s file."

    I doubt very much that you can simply change the startup file in that way and have everything else just burst into life.

    "3. Device adress 0x58 is not working.So ..."

    What hardware configuration have you got? changing it to what is correct for our custom platform may well not be appropriate for your platform.

    A suggestion for any work around or solution is most appreciable.

    Remote bug finding on a platform that you've provided no information on is quite challenging!

    Have you tried single stepping through the code to see where it is misbehaving?

  • Thanks for the reply.

    Now while debugging, I see the USB_GetDescriptor function is invoked and the valid vid and pid host registry Enum too..along with, a vid and pid 0 enum is registered.

    But still the usb device is not recognized in the device manager of the host.

    NB:Board lpc3250, evaluation kit [Devkit3250], with USB transceiver ISP1301, same that is used in sample code. All settings from sample code.

  • "Now while debugging, I see the USB_GetDescriptor function is invoked and the valid vid and pid host registry Enum too..along with, a vid and pid 0 enum is registered."

    host registry? - Are you debugging your Windows application or the board?

  • There is no windows application. Of-course device driver.

    host registry: -In windows registry, currentcontrolset->enum->usb

    device is LPC3250
    host is windows

    while the application is running/debugging on device and the usb cable is connected!!!!

  • "There is no windows application. Of-course device driver."

    You're asking questions about the LPC3250. Don't you think it would be more valuable doing some debugging of that side?

  • Yes it is Debugging on device side only, using uvision and ulink2ICE

    and when the cable is connected, i get in the USB_GetDescriptor (where I set the breakpoint) and I see USB_DeviceDescriptor (which is having vid and pid) is send back to the host from device.

    these settings i am able to see in the host registry toooooo.
    device manager doesnot reflect this.

  • Ok. So we've now established what you're actually debugging.

    You say your evaluation board has an ISP1301, but have you confirmed that it is being accessed correctly? Is the I2C address as expected by the example code?

    Have you now checked the startup code to ensure that it is enabling all the necessary devices on the board correctly - Including the SDRAM.

    Is the memory layout of your evaluation board the same as expected by the example code?

    These are questions you should have answers to. In answering those, you might find the a difference that is causing your board to fail. I can confirm that I got the basic example code working on our custom board, with only minor tweaks.

  • Thanks for the replies IB Shy,
    I have made it work.

  • I have been struggling to get USB Host configured on the Phytec Board (with a different OS & Compitler). I have confirmed the ability to configure the ISP1301 and clocks appear to be correct.
    I have configured the LPC3250 USBHost controller in DAT/SE0 bi-directioanl mode to the point that it queues Transfer Buffers, but the D+/D- lines never toggle on the scope. Each transfer subsequently results in a "No Device Response" condition code.

    Do you have a code fragment that configures USBHost that you can share? Or possibly just register dumsp of the relevant USB register?