[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [usb] Usb1.1: Minor inconsistent behaviour
Setting configuration:
Make sure that wIndex, wLength and wValue (upper byte) for SetConfiguration
are 0.
Strings.
String Index 0 _is_ the Array of Language ID's (9.6.5, USB 1.1 Spec). The
first string index that contained a string would be Index 1.
The strings themselves are Non null terminated Unicode (not ascii) strings.
Without knowing the specifics of your device, I'm not sure I am reading this
correctly, but...
> `define ROM_SIZE0 7'd018 // Device Descriptor Length
This is correct. The length of the Device Descriptor is 18
> `define ROM_SIZE1 7'd032 // Configuration Descriptor Length
The length of a configuration descriptor is 9. There is also Total Length
which includes the configuration, interface and endpoint descriptors. For
the device you described, that would be 9 + 9 + 6 + 6 = 30. So, I'm
confused by the 32.
> `define ROM_SIZE2A 7'd004 // Language ID Descriptor
Don't know what this is
> Start Length
> `define ROM_SIZE2B 7'd010 // String Descriptor Length
Depends on the string
...
> section from usb1_rom.v:
>
> // ====================================
> // ===== String Descriptor Lang ID=====
> // ====================================
>
> 7'h32: dout <= #1 8'd04; // this descriptor
> // length IT SHOULD READ
> // THE LANG IDS STARTING HERE
> 7'h33: dout <= #1 8'd03; // descriptor type
> 7'h34: dout <= #1 8'd09; // Language ID 0 low byte
> 7'h35: dout <= #1 8'd04; // Language ID 0 high byte
This seems correct. Only one language is supported, English.
> // ====================================
> // ===== String Descriptor 0 =====
> // ====================================
The Language ID is String Descritptor 0. This should be string descriptor
1
> 7'h36: dout <= #1 8'd020; // this descriptor length
Are you saying the length is 20? Looks like 10 to me.
> 7'h37: dout <= #1 8'd03; // descriptor type
This is a string descriptor, that is correct.
The string below should be Unicode. Do the values below somehow get
translated to unicode somewhere? If they do, the string descriptor length
should be 18, not 20.
> 7'h38: dout <= #1 "0";
> 7'h39: dout <= #1 " ";
> 7'h3a: dout <= #1 "g";
> 7'h3b: dout <= #1 "n";
> 7'h3c: dout <= #1 "i";
> 7'h3d: dout <= #1 8'd04;
> 7'h3e: dout <= #1 8'd03;
> 7'h3f: dout <= #1 8'd09;
Don't understand the last three entries.
> // ====================================
> // ===== String Descriptor 1 =====
> // ====================================
>
> 7'h40: dout <= #1 8'd04; // this descriptor length
This string looks longer than 4.
Similar comments to the previous string apply here.
> 7'h41: dout <= #1 8'd03; // descriptor type
> 7'h42: dout <= #1 "1";
> 7'h43: dout <= #1 " ";
> 7'h44: dout <= #1 "g";
> 7'h45: dout <= #1 "n";
> 7'h46: dout <= #1 "i";
> 7'h47: dout <= #1 8'd04; // BUT IT ACTUALLY READS
> THE LANGUAGE ID
> TABLE STARTING HERE
> 7'h48: dout <= #1 8'd03;
> 7'h49: dout <= #1 8'd09;
Marc Reinig
System Solutions
--
To unsubscribe from usb mailing list please visit http://www.opencores.org/mailinglists.shtml