cancel
Showing results for 
Search instead for 
Did you mean: 

USB Enumeration Problems

kelly2
Associate II
Posted on November 07, 2008 at 12:37

USB Enumeration Problems

6 REPLIES 6
kelly2
Associate II
Posted on May 17, 2011 at 12:51

Hello Anybody,

I am attempting to put a hacked version of the Virtual Com into an application. I have modified the example files to suit my needs (possible problem there ;) ) and when I plug in the USB cable to my custom board, the PC (XP SP3) pops up and doesn't recognize the device.

Here is what I know...

I have used a USB snooper and found that none of the usual traffic is occuring. When I snoop my JTAG, I get URB type transfers and see the descriptors fly by. When I connect my device, I get type PNP transfers performing query_ID and Query_Device_Capibilities.

In my firmware, I see that I get a reset interrupt and later get the message from the computer to ''GetDeviceDescriptor.'' I have followed it out and see that the EP0 get the message to TX. But nothing else comes in.

Help please.

16-32micros
Associate III
Posted on May 17, 2011 at 12:51

Hi kelly1,

Could you please detail what you mean by ''Hacked version '' ? in terms of changes versus the reference one. Did you tried the ST official ones on the Web pages first ? Let me know.

Cheers,

STOne-32.

pandoraems
Associate II
Posted on May 17, 2011 at 12:51

First some sanity check:

- driver installed in XP?

- tried running the original vcom and it works? (i assume yes)

- unknowingly, i once increased the maximum packet size (larger than 64 that was there) - USB host didn't like that (for a good reason)

not sure what else to suggest - diff yours against the original, maybe a light bulb will pop up ;)

If that won't help, add small chunks of your changes incrementally - i know it's tedious, but should let you narrow it down

Many things may mess USB up. Even such things as the USB power draw - bit me once.

kelly2
Associate II
Posted on May 17, 2011 at 12:51

With the recommendation to try to revert back to the original vcom code, I started looking doing just that. My ''hacked'' version relates to how I process and understand code. I go line by line and usually adjust small things like spaceing while geting a feel for the libraries.

To make a long story short, I started by reverting back to the original USBLIB files while keeping my application support files the same. I downloaded the files from the web, adjusted a few includes, and suddenly I started enumerating. Now I have the VCOM code working on EP1 and EP3 and running smoothly. Today's goal is to get an understanding of requesting power.

Any help on that? What are the units talked about for current in the device discriptor? Does the ST VCOM Driver issue the suspend command on com port close or any other time?

[ This message was edited by: kelly1 on 07-11-2008 16:18 ]

pandoraems
Associate II
Posted on May 17, 2011 at 12:51

Since the USB spec is overzealous, your starting point into USB should be something like this:

http://www.beyondlogic.org/usbnutshell/usb1.htm

this is your homework ;)

kelly2
Associate II
Posted on May 17, 2011 at 12:51

Great! I am all good. (Horrible english!)

Thanks for everybodies help.