'Error in making my own usb stack for stm32f4

actually I am on the path of learning usb . so I want to make my own usb stack for stm32f4 mcu. But I got stuck at one point . actually the problem is my framework layer accept and recognise the control request and the request is get descriptor but the wlength is 64 bytes instead of 18(size of device descriptor). And also I transfer the data to in endpoint 0 but the usb host never send the in token after the setup stage completion instead the setup stage is called again and after windows show the prompt message not able to recognise the device Please help me what is that I am missing in my framework



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source