2025-05-15 6:04 PM
Hello,
I use EP1 (IN/OUT) for bulk transfer(64 byte) and EP2 (IN) for interrupt transfer(64 byte).
I need to use the Vendor-Specific Class for this configuration.
Using STM32CubeIDE 1.18.0 to create a usb device, which class shall I use to create this
USB configuration.
I tried using the Communication Device Class, because it includes EP1(IN/OUT) for bulk transfer and
an interrupt transfer endpoint.(primarily for sending notifications back to host)
Instead of using interrupt transfer endpoint for sending notifications,
I tried modifying this endpoint to send data back to the host when it polls for it.
However, the USB device does not seem to respond to the host polling.
Is this the correct way to do it?
I have also attached my source code
thank you very much!!
Solved! Go to Solution.
2025-05-21 3:41 AM
Hi @usbdes777
You can start configure it as custom HID class.
If the host is a Windows computer, it is recommended to add a WinUSB device descriptor to the custom function to be able to use the WinUSB API on the Windows side and avoid a custom driver.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-16 1:00 PM - edited 2025-05-16 1:07 PM
Please see here https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/automatic-installation-of-winusb how to create device descriptors for "vendor-specific" device that can be operated via the WinUSB or LibUSB libraries. Windows will automatically detect such devices, no extra drivers are needed.
The cube-generated code for any class can be adjusted manually. Add the proper interface descriptor and endpoint descriptors.
2025-05-21 3:41 AM
Hi @usbdes777
You can start configure it as custom HID class.
If the host is a Windows computer, it is recommended to add a WinUSB device descriptor to the custom function to be able to use the WinUSB API on the Windows side and avoid a custom driver.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-21 5:49 PM
Thanks for your advice,Much appreciated!