[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[usb] ROM example with working string descriptors?
Hello,
We are using the OpenCores USB1.1 Function controller and are
attempting to get our device working under Windows. Using libusb (the
user space USB library) we have been able to get our device working
under both Linux and Mac OS X. We want to get the string descriptors
working to rule out possible causes of errors. Can someone post an
example ROM that has string descriptors which are KNOWN to work
correctly? Including the Unicode encoding? We are having problems
getting it to work correctly, and are wondering if it is because we are
setting up the ROM incorrectly.
We have been doing some debugging using the "USB Compliance Tool" which
can print out the bytes read from the string descriptor. Each time we
read the string descriptors it seems like we are getting different
values, which is very strange. Sometimes it appears to give us the
value in the ROM, other times it appears to be reading from nearly
random points in the ROM. I'm trying to figure out why my program to
dump the string descriptor under Linux isn't working, since the device
seems to work more reliably with Linux.
The results that we are getting back are very strange. We attempted to
create our own string descriptor, but eventually just uncommented the
code that exists in CVS. We have a few questions about these defines,
from usb_defines.v:
`define ROM_SIZE0 7'd018 // Device Descriptor Length
`define ROM_SIZE1 7'd053 // Configuration Descriptor Length
`define ROM_SIZE2A 7'd004 // Language ID Descriptor Start Length
`define ROM_SIZE2B 7'd010 // String Descriptor Length
`define ROM_SIZE2C 7'd010 // for future use
`define ROM_SIZE2D 7'd010 // for future use
`define ROM_START0 7'h00 // Device Descriptor Start Address
`define ROM_START1 7'h12 // Configuration Descriptor Start
Address
`define ROM_START2A 7'h47 // Language ID Descriptor Start Address
`define ROM_START2B 7'h50 // String Descriptor Start Address
`define ROM_START2C 7'h60 // for future use
`define ROM_START2D 7'h70 // for future use
What is "Language ID Descriptor Start Length"? I'm assuming that it
should contain the language ID descriptor length? Why is it called
"start length"?
We set the Language ID Descriptor Start Address to the ROM address of
the language ID descriptor, and the String Descriptor Start Address to
the address of the first "real" string. Is this correct? Is that first
"real" string the String Index 1?
Thank you for any assistance you can provide,
Evan Jones
--
Evan Jones: http://www.eng.uwaterloo.ca/~ejones/
"Computers are useless. They can only give answers" - Pablo Picasso
--
To unsubscribe from usb mailing list please visit http://www.opencores.org/mailinglists.shtml