cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB Library for WinUSB

Stephen28
Associate III
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
12 REPLIES 12
Stephen28
Associate III
Posted on August 19, 2012 at 04:23

Thanks kattan.darren, this is a nice addition, but I am looking for an ST library with will interface with the USB demo program at 

http://lvr.com/winusb.htm

.  It provides data transfer for Control, Interrupt, and Bulk.  I have it working with data going to the ST, but I am currently having trouble getting the data from the ST back to the PC.

arnaljl2
Associate II
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
Associate
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.