Skip to main content
Stephen28
Associate III
Apr 10, 2012 2:57 AM UTC
Question

STM32 USB Library for WinUSB

Posted on April 10, 2012 at 04:57

Does anyone have a demo /  tutorial on how to setup the STM32 USB Library to work with the WinUSB driver.  Jan Axelson's ''USB Complete Fourth Edition'' describes how to setup the descriptor, and how to setup the INF file for Windows, but I am not sure what pieces of the USB Library that I need or how to set them up.

#winusb #stm32 #usb
This topic has been closed for replies.

12 replies

arnaljl2
Associate II
Feb 28, 2013 11:59 PM UTC
Posted on March 01, 2013 at 00:59

dear pila.rosarium... this answer is really clever. Are you this frustrated ? Please redirect your anger against Python fanboys.

Corlan Dashiva
Visitor II
Nov 3, 2017 10:06 PM UTC
Posted on November 03, 2017 at 23:06

Actually you may use the WinUSB even without the .inf file. Setting up device, configuration and qualifier descrpitors shoud not be a problem. Just copy following files (.h and .c :(

usb_device

usbd_conf

usbd_core

usbd_ctlreq

usbd_desc

usbd_ioreq

from any other class, preferably CDC. You have to create USBD_ClassTypeDef structure of callbacks and set-up the descriptors as desired. Just set the class in device descriptor as 00 ( specified by interface ), in interface set it to FF ( vendor specific ).

Google for WinUSB signature user string. Return this descriptor, when you will receive request for string at 0xEE.

Provide additional two descriptors - ExtendedCompatID and ExtendedProperties. You may find info about these on Microsoft MSDN. There is a .zip file with three .docx file, exactly explaining what you need.

In usbd_conf file in USBD_LL_Init method you would like to change PMA memory addresses assigned to your endpoints. That is important.

Minor edit would be required in file usbd_ctlreq, as the ST usb firmware does not forward setup device callbacks to your class setup method.

Good luck.