"Unknown Device" when attempting USBCDC example

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

"Unknown Device" when attempting USBCDC example

2,213件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSchwendeman on Mon Apr 18 19:09:42 MST 2011
Hello Everyone!

I'm attempting to implement the USB soft connect transistor as wired in the following schematic (I also use the reset and bootloader circuitry shown): http://www.microbuilder.eu/Files/Projects/LPC1343RefDesign/LPC1343_Schematic_v1.6.pdf

The USB bootloader works as expected, and I am able to download code and verify operation (blinking lights, read buttons, etc).  However, when i attempt to deploy the USBCDC example, upon reset my computer (XP 32bit) complains about an "Unknown USB" device.  Attempting to point to the vcom driver, windows complains that the driver doesn't match the hardware.  Checking in the device manager, I can see that the VID and PID for the device are both called out as _0000 (doesn't match the PID/VID in the .inf, makes sense).  I checked the config.h code included in the example, and verified that they match those in the lpc134x-vcom.inf file.  Recompile, still no luck.  I thought there might be some issue with the micro expecting USBVBUS to be low on reset, and then high later on, so I placed a switch in between, allowing me to toggle USBVBUS, still no luck.

Now here's the interesting part.  In the microebuilder code examples, there are some test binaries that allow one to test out their hardware after assembly.  If I load the usbcli.bin example, upon reset the device enumerates correctly, I'm able to point to the driver and away we go. 

Does anybody see any glaring differences between the code in the USBCDC example and my hardware that might be causing this issue?

Questions and comments are greatly appreciated!
.jim
0 件の賞賛
返信
7 返答(返信)

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSchwendeman on Tue Apr 26 20:21:20 MST 2011
Hi KTownsend,

I deleted the drivers when moving between the HID and MSD examples to get them to work, but at least I see that the VID and PID of the device is correct.  For all of these instances, the PID and VID are _0000.  I tried changing PID and VID with no luck, still shows up as zeros.

This just seems bizarre to me that I can get some samples that work consistently, and some samples that fail consistently...


Quote: KTownsend
If you've already installed a device using one profile like mass storage or CDC or HID with the same VID and PID, Windows may be confused because it previously installed a driver for a different profile with these same IDs.  Try changing the PID to something else (and updating the .inf file as well if using USBCDC) and see if this helps.

0 件の賞賛
返信

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSchwendeman on Tue Apr 26 19:09:34 MST 2011
Hello NXP_Europe,

Why would this softconnect circuit work for the USBHID and other USB examples, but not work for the USBCDC example?  Likewise for the bootloader?  I am easily able to plug the device in, enumerate as mass storage, and load new binaries on.

Regarding the PNP transistor, I guess I don't see how the LED acts as an additional load on the USB+ line.  The transistor collector goes to ~3.3V when USBCONNECT goes low.  That 3.3V pulls up the 1.5k resister to USB+ and also drives the LED, but one shouldn't effect the other, should it?
0 件の賞賛
返信

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Mon Apr 25 04:27:04 MST 2011
Hello JSchwendeman,

Did you try to disconnect the LED circuit? This is an extra load for the USBD+ (via 1.5 k).

You are switching the USBD+ via R19 (1.5k) to 3.3V. Did you you check a switching power of +5V? The hardware should be changed a little by e.g. adding an extra NPN transistor. The USBCONNECT-signal needs to be inverted.
0 件の賞賛
返信

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Sun Apr 24 15:20:12 MST 2011
If you've already installed a device using one profile like mass storage or CDC or HID with the same VID and PID, Windows may be confused because it previously installed a driver for a different profile with these same IDs.  Try changing the PID to something else (and updating the .inf file as well if using USBCDC) and see if this helps.
0 件の賞賛
返信

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSchwendeman on Sun Apr 24 09:35:43 MST 2011
Out of curiosity, what potential issues could throw the init code out of whack for certain examples, but not others?  That is to say, I've compiled and tried the following sets of code and they all work as expected (VID and PID show up as expected):

USBHID, USBHID_ROM, USBMSD_ROM

I've compiled and tried these following sets of code and they all fail (where the USB device shows up as PID and VID = 0000 and windows identifies as "Unknown Device"):

USBCDC, USBHID_ROM_TINY, USBMSD

When I look at the config.h files in each of these projects, I see that they all have this code in common:

#define NXP_VID  0x1FC9
#define MY_VID    0x????

#define USB_VENDOR_ID NXP_VID // Vendor ID
#define USB_PROD_ID   0x0003// Product ID
#define USB_DEVICE    0x0100// Device ID


This would indicate that they all have the same VID and PID programmed correct?  I should probably point out that these are all examples downloaded off the LPCXpresso and haven't changed any source code at this point...

I have been using the bootloader to program all of these, rather than the LPC-Link.  Are there differences between where and how the code is executed between either location that could lead to this issue?

Could my selection of SoftConnect transistor result in some timing sensitivity for some of these examples?
0 件の賞賛
返信

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Wed Apr 20 02:53:54 MST 2011
If you're getting 0000 for your VID and PID but the test firmware works, it's almost certainly a SW issue.  You'll have to take a better look at the init code, etc.
0 件の賞賛
返信

2,129件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSchwendeman on Tue Apr 19 20:04:57 MST 2011
An additional piece of information I can supply:

When using the USBCDC binary compiled from LPCXpresso, I see that the SoftConnect is linked to USBVBUS.  That is to say, when I plug in my USB cable, VBUS goes high, and the LPC enables the soft connect.  Unplug, and the soft connect indicator turns off...

When I try the pre-compiled hardware test binary that actually works, I see that the softconnect indicator is always on, regardless of whether VUSB is high or not.

Any thoughts?

EDIT:

Here's a new, strange piece of information to add to the puzzle.  I compiled the USBHID example, loaded, and was able to run as expected!  I can run the HID example, get the description strings from the device and toggle the inputs and outputs.  Does this suggest some sort of driver problem on the windows side?  I've tried this on both my home and work PCs (which are WinXP, 32bit, SP3), so I'm a little surprised if that is the case!?
0 件の賞賛
返信