Hi TI,
I have TUB1210 on my FPGA_based custom board and I want to use TUSB1210+FPGA as a usb device. and I just want to transfer hex data between Pc and this usb device in fullspeed mode.
after attaching idpullup resistor to D+ line, PC recognized this as an unknown usb device and in "universal serial bus controller " branch in device manager demonstrated:
so I considered usb2 spec. and then start to answer to Descriptor requests as mentioned in following file:
here is the descriptor requests that i recieved from PC and the answers that i sent using ULPI bus.
PC Request:(GET_DESCRIPTOR Device Request)
c3 80 06 00 01 00 00 40 00 DD 94
TUSB1210+FPGA answer:
CONSTANT s_DSC_Device: STD_LOGIC_VECTOR(159 DOWNTO 0) :=
-- 18 bytes device descriptor
X"12"& -- bLength = 18 bytes
X"01"& -- bDescriptorType = device descriptor
X"0002" & -- bcdUSB = 2.00
X"00"& -- bDeviceClass = base class
X"00"& -- bDeviceSubClass = base class
X"00"& -- bDeviceProtocol = base class
X"40"& -- bMaxPacketSize0 = 64 bytes
X"5104"& -- idVendor
X"0715"& -- idProduct
X"0001"& -- bcdDevice
X"01"& -- iManufacturer
X"02"& -- iProduct
X"03"& -- iSerialNumber
X"01"& -- bNumConfigurations = 1
-- CRC16
X"9499" ;
-----------------------------------------------------------------------------
PC Request:(GET_DESCRIPTOR Configuration Request)
c3 80 06 00 02 00 00 FF 00 e9 a4
TUSB1210+FPGA answer:
Constant s_DSC_FSConfiguration : STD_LOGIC_VECTOR(551 DOWNTO 0) :=
--32 Bytes configuration
X"09"& -- bLength = 9 bytes
X"02"& -- bDescriptorType = configuration descriptor
X"20"& X"00"& -- wTotalLength = 32 bytes
X"01"& -- bNumInterfaces = 1
X"01"& -- bConfigurationValue = 1
X"00"& -- iConfiguration = none
X"80"& -- bmAttributes=Bus Powered
X"19"& -- bMaxPower = 50 mA
-- 9 bytes interface descriptor (data class)
X"09"& -- bLength = 9 bytes
X"04"& -- bDescriptorType = interface descriptor
X"00"& -- bInterfaceNumber = 0
X"00"& -- bAlternateSetting = 0
X"02"& -- bNumEndpoints = 2
X"0a"& -- bInterfaceClass = Data Interface
X"00"& -- bInterfaceSubClass = none
X"00"& -- bInterafceProtocol = none
X"00"& -- iInterface = none
-- 7 bytes endpoint descriptor ()
X"07"& -- bLength = 7 bytes
X"05"& -- bDescriptorType = endpoint descriptor
X"81"& -- bEndpointAddress = IN endpoint (D7), first endpoint (D0)/
X"02"& -- bmAttributes = /
X"40"& X"00"& -- wMaxPacketSize = 512 bytes
X"00"& -- bInterval
-- 7 bytes endpoint descriptor ()
X"07"& -- bLength = 7 bytes
X"05"& -- bDescriptorType = endpoint descriptor
X"01"& -- bEndpointAddress = out endpoint (D7), first endpoint (D0)
X"02"& -- bmAttributes = /
X"40"& X"00"& -- wMaxPacketSize = 512 bytes
X"00"& -- bInterval
-- CRC16
X"C5E5" --CRC16
;
----------------------------------------------------------------------------
PC Request:(GET_DESCRIPTOR string3 Request)
c3 80 06 03 03 09 04 FF 00 96 0a
TUSB1210+FPGA answer:
x"0000" --iserialnumber=null
----------------------------------------------------------------------------
PC Request:(GET_DESCRIPTOR language ID Request)
c3 80 06 00 03 00 00 FF 00 d4 64
TUSB1210+FPGA answer:
X"04", -- bLength = 4
X"03", -- bDescriptorType = string descriptor
X"09", X"04" ); -- wLangId[0] = 0x0409 = English U.S.
----------------------------------------------------------------------------
PC Request:(GET_DESCRIPTOR string2 Request)
c3 80 06 02 03 09 04 FF 00 97 db
TUSB1210+FPGA answer:
*I sent a name
----------------------------------------------------------------------------
PC Request:(GET_DESCRIPTOR DEVICE_QUALIFIER Request)
c3 80 06 00 06 00 00 0a 00 5F 34
TUSB1210+FPGA answer:
constant descrom_qual: t_byte_array(0 to 11) := (
-- 10 bytes device qualifier
X"0a", -- bLength = 10 bytes
X"06", -- bDescriptorType = device qualifier
X"00", X"02", -- bcdUSB = 2.0
X"0a", -- bDeviceClass = Communication Device Class
X"00", -- bDeviceSubClass = none
X"00", -- bDeviceProtocol = none
X"40", -- bMaxPacketSize0 = 64 bytes
X"01", -- bNumConfigurations = 1
X"00", -- bReserved
X"A756" --CRC16
);
1-as I mentioned in above file, GET_DESCRIPTOR DEVICE_QUALIFIER Request is latest request that I received from PC and then just it sends SOF. why I didnot receive other Requests(specially set_configuration request that as I understand is necessary to complete identifying)?
after this negotiation, I have a device in "other devices" branch in device manager, with an alarm icon on this:
2-why it was shown in "other devices" branch instead of "universal serial bus controller " branch?
3-why there is alarm icon on it?
also i attached debug result that shows data transaction contain SETUP, IN and OUT packet are correct:
please let me know what is the problem.
Thanks.