I've been trying to implement a usb-device peripheral driver crate and run into the roadblock of being able to read and write from the usb bus but the usb-device code won't send a more than 12 bytes of the device descriptor. After hacking a bit around in the usb-device code to send all 18 bytes in one packet (in EP packet size = 32 bytes) enumeration still fails with "Timeout while waiting for setup device command" without a request packet having been send from the host (i've been using wireshark to read the packets from the bus).
My current guess is that the poll function isn't correct (and the reset function since i'm not entirely sure what it means for an endpoint to be in a state suitable for enumeration besides EP 0 being allocated,enabled and not having NAK set)
That being said im not really familiar with usb's inner workings. My code is on github gd32vf103xx-usbd. Any hints and resources for learning more about the usb enumeration process are greatly appreciated.
EDIT: Whats also weird is, that the first packet i receive from the host isn't SET_ADDRESS but GET_DESCRIPTOR which should be the other way round if i interpreted the USB 2.0 spec correctly.