-
Notifications
You must be signed in to change notification settings - Fork 38
Home
This project show the steps to convert STM32 USB CDC to WINUSB Device with HAL library. You can following the steps(as shown in sequential commits) to create the WINUSB device.
We have to change the source code of CDC USB HAL library to convert to WINUSB.
The name 'CDC' will be retained in order to show the differences.
With implementation of Microsoft OS String Descriptor, no need to install WINUSB driver for Windows 10.
Using STM32F072 Discovery board
Changes of usbd_cdc_if.c and main.c to implement simple echo function.
Change source code of USB library. Create a DeviceInterfaceGUID = {13eb360b-bc1e-46cb-ac8b-ef3da47b4062} The DeviceInterfaceGUID is written into both OSStringPropertyDescriptor and INF file.
Create my_winusb.inf using DeviceInterfaceGUID as described previously. The inf file need to match the VID, PID, and DeviceInterfaceGUID of the USB device. Only Windows 7 and before need install driver.
Use WINUSBNET library from https://github.com/madwizard-thomas/winusbnet to create simple echo test program using Visual Studio with C# WinForm component.
Using STM32F4 Discovery board with generate project using TrueStudio. There is not much difference from F0.
Another option to install drivers is using Zadig. The usage of Zadig can be found at here..
-
Advanced Mode (Options ? Advanced Mode)
In this mode we can configure our device with defined values.
-
Open Preset (Device ? Load Preset Device)
Load the predefined values(especially "Device Interface GUID") for the device driver. The sample config.ini is in the folder "Zadig".