AnsweredAssumed Answered

STM32 WinUSB driver Autobinding. Get it here.

Question asked by kattan.darren on Jul 2, 2012
Hey guys, I just wanted to share something cool I did recently.

For people that are making custom peripherals (that don't abide by a particular class like HID, MSD, etc) it is very advantageous to have a generic USB driver binded to your device. Windows Vista, 7, and 8 make use of WinUSB.sys as a generic driver and if you perform a special "handshake" of sorts, you can actually convince Windows to bind this driver to your hardware automagically (literally zero user interaction). Your user level application can then either directly talk to WinUSB, or can use a library like libusb-1.0 (not libusb-win32) to talk to your hardware.

Attached are both of the USB Libraries ST makes available, with the changes made to make them autobind.

The example that I made work is the HID Device example for the STM32F107 (using the Full Speed OTG USB peripheral)

Please note that I am developing this on custom hardware that uses a 16MHz external oscillator so be sure to configure your PLLs accordingly such that your USB peripheral gets its appropriate 48Mhz clock.

Also, I do not have VUSB pinned out, so that functionality is disabled.

I would LOVE to see ST add this functionality to the existing library, as it would make the lives of custom hardware designers MUCH easier.

Outcomes