[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [usb] ROM example with working string descriptors?



On Thu, 2003-07-03 at 10:48, Evan Jones wrote:
> Hello,
> 
...
> 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"?

Sorry, thats a typo, it should be "Language ID Descriptor 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?

Here you must set everything relative to the location in the ROM.
So "String Descriptor Start Address" is the offset (pointer) in to
the ROM. It has to point to the beginning if the string descriptor,
not the string itself. The ROM contents should be 0x01 for string
descriptor 1, 0x02 for string descriptor 2, and so on ...

Remember all of this is being used by a state machine that is reading
the ROM and dumping it's contents to usb bus ...

> Thank you for any assistance you can provide,
> 
> Evan Jones


Regards, 
rudi               
--------------------------------------------------------
www.asics.ws  --- Solutions for your ASIC/FPGA needs ---
----------------- FPGAs * Full Custom ICs * IP Cores ---
FREE IP Cores --> http://www.asics.ws/ <-- FREE IP Cores

--
To unsubscribe from usb mailing list please visit http://www.opencores.org/mailinglists.shtml