Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB device Enumeration problem

Status
Not open for further replies.

shmd

Newbie level 2
Joined
Jun 9, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
24
Hi,
I'm coding a FSM to be enumerated by host using Altera de2-115 and communication daughter board which has a USB3300 PHY chipset,

also I use quartus signalTap ii to observe signals.

the state machine starts with resetting the PHY and after that wait for a cable connection, then, waits for getDescription setup packet, and SetAddress setup packet,

FSM steps:

1- wait for token packets,
- SETUP
- OUT
- IN
2- after receive a SETUP
- wait for DATA0
3- after receive data sends ACK

4- there is an IN token now

5- send Device_Descriptor to host

6- wiats for out token

7- there is an OUT token but this is incomplete, I can get OUT_token_PID then first byte Address_Endpoint but before receiveing the second packe EndP_CRC the
dir_signal will be dropped,
8- these steps repeat several times then windows7 X64 or windows XP will report a malfunction USB device.


i have no idea how to solve this problem or what is the problem.


thanks
 

Is it that you have defined a sequence of operations?? as in a pre-defined sequence in which packets should be received?? If thats the case, then I'm afraid USB does not send descriptors in a sequential fashion. They can come randomly.
 

Is it that you have defined a sequence of operations?? as in a pre-defined sequence in which packets should be received?? If thats the case, then I'm afraid USB does not send descriptors in a sequential fashion. They can come randomly.

there is no pre-defined sequence, setup packets are assessing independently, because they have data that explain, what is the next step. I process the setup transactions and wait for any token packet like IN_TOKENS, OUT_TOKENS, based on what i got from setup stage, i can decide about the next operation.
based on windows enumeration steps (from windows usb team blog), firstly i should see the setup packet and following it an IN_TOKEN (from USB2.0 specs chapter 6) then i'll send the DATA1 followed by a Device_Descriptor, after that i have to get an OUT_TOKEN next a DATA1 from Host with no data and just 16 bits of CRC(0 value),
after that i have to send an ACK to Host.
this is the first step after this i have to get a Set_Address, the only thing i can get, is an incomplete OUT_TOKEN after i send my Device_Descriptor, so i serve every TOKEN not in any pre-defined order , but if it was random i should see some other TOKENS randomley?
and if you think it's random, how can I recognize?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top