usb protocol: my device is not see any next packet after set address request

53 views Asked by At

i can't see any packet after i set address for usb device.

hello everyone i'm writting code for usb device im use STM32F103RCT6 microcontroler for my project,because i'm not use library (hal,.. or copy any code from network resource) so i write code for my self, yeah it's crazy idea ,I often do the same for other projects,it may be it too hard, but i really want to know how it works. And now i get to the point. when i attach my usb device in my computer:

1.the host will reset. 
2.(OUT)the host will send the DEVICE DESCRIPTOR request.
3.(IN)the device will send back to the host information about DEVICE 
DESCRIPTOR.
4.(OUT)and host will send to device a zero packet for confirm that the 
packet was received correctly.
5.(OUT)the host will reset again and send to device the SET ADDRESS 
request.  
6.(IN)after the device send the zero length packet and host received 
correctly(reply with ACK).

Now i set address value (Wvalue in SET ADDRESS packet) imedialy to D_ADDR register,but i cant see any packet from the host to my device (i looking for DEVICE DESCRIPTOR request) this is my code. enter image description here I'm sorry because my English is quite poor (mostly from google translate) Thank you for any help.

0

There are 0 answers