cancel
Showing results for 
Search instead for 
Did you mean: 

How to Implement WinUSB Instead of CDC_ACM on STM32U5 Series MCU.

SITARAM
Associate III

Hiii,

I am currently using an STM32U5G9J-DK2 Discovery Kit and have configured USB in CDC_ACM mode in high speed. I generated a code  default the usb device appears in device manager under ports as a virtual COM port. However, I would like to change this functionality so that it works as a WinUSB device instead.

  • I got a example useful GitHub repository that provides a solution for converting CDC_ACM to WinUSB:

       "https://github.com/MichaelTien8901/STM32WINUSB" .

this above link will show steps to convert STM32 USB CDC to WINUSB Device with HAL library.

 

  • And the bellow link shows . Convert CDC to WINUSB by changing the descriptors and some HAL USB library files.

      "https://github.com/MichaelTien8901/STM32WINUSB/commit/d6a8037b8c282652bd62fa252435c10598939752"

 

  • I successfully implemented these changes on an STM32H7 series controller since its USB stack is quite similar to the STM32F4 series used in the example.
  • However, I’m now facing challenges porting this to the STM32U5 series because its USB device stack is significantly different from the F4/H7 stack.

My question is:

  • Has anyone successfully implemented WinUSB on the STM32U5 series?
  • Which files and descriptors need to be modified in the STM32U5, USB stack to support WinUSB?

Any guidance or examples would be greatly appreciated.

Thank you!

 

 

 

4 REPLIES 4
FBL
ST Employee

Hi @SITARAM 

You may want to use this classic middleware as reference to port your device stack to support WinUSB.

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.


SITARAM
Associate III

Thank you for your support, mr @FBL,


Actually i am a fresher and have only recently started learning and practicing with STM32, so it's quite difficult for me to follow everything you've suggested right now.

If there's any tutorial  available related to this, could you kindly share it?
That would be very helpful for me and for many other beginners who are also learning STM32.

Thanks again for your guidance

Pavel A.
Super User

Hi @SITARAM 

This article on Guide to USB development resources on STM32 can help you get started with resources available about USB on STM32. You can get started with this example, test it and if you encounter issues you can get back and post your questions on ST community.

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.