I have developed some USB HID code using STM cube and seems to be working ok, in that it is seen in the device manager. However when going through the workings of this code it seems a little odd.
When the current mode is set to device mode GUSBCFG -> bit30, this sets GINTSTS bits 12 &13, reset and enumeration.
Its only later on when the SDIS bit is set in the DCTL register that the device starts communication with the host. Surely the reset and enumeration would not be done until this line is pulled high as the host sees nothing connected.
Why is the core setting enumeration is complete before it is even connected??