USB HID device enumeration and driver installation
Hello,
I have a STM32F042 as USB HID Keyboard done with STM32CUBEIDE. Everything works nicly. Now here is my problem. If I plug the device into a running Windows PC for the first time the driver installation appears and all is fine. However if I plug it into a turned off PC where it has not been installed previously the installation does not start. I have to unplug it and replug it for it to work. Now I wrote a sort of failsave routine that checks if the LED's have been set. If this doesn't happen for some time (if it was pluged in to a turned off PC that was then turned on) then it resets itself after some time, forcing a reenumeration. However it does still not work. I still have to unplug and replug it inspite of the reset. Is there a way of doing this with software and without the need of replugging? I somewhow need to cheet windows in thinking the device was unplugged and replugged.
