Skip to main content
xlrl
Associate III
April 4, 2023
Question

How to create a STM32G431 USB Composite Device using STM32CubeMX+USB Device Middleware

  • April 4, 2023
  • 1 reply
  • 5283 views

We are working on porting an existing STM32F373 USB application to STM32G431 using STM32CubeMX and the USB Device Middleware. The USB device is a composite device of two custom interfaces.

The first interface is a multitouch interface with 1 endpoint, the second interface is a vendor interface with 2 endpoints.

Is there any example on how to create composite USB devices with the middleware?

This topic has been closed for replies.

1 reply

KDJEM.1
Technical Moderator
April 5, 2023

Hello @xlrl​ ,

I recommend you How to export a project configuration to a compatible STM32 FAQ.

This FAQ can help you to to migrate your current application with STM32F373 to the STM32G431.

Also, you can get inspired from the available examples in the STM32CubeH7 MCU package to create USB Composite application with STM32G431

I hope this help you!

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Thank you

Kaouthar

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.
xlrl
xlrlAuthor
Associate III
April 5, 2023

The existing solution quite old and not based on STM32CubeMX, but on STM32_USB-FS-Device_Driver V4.0.0. The existing code was modified in many places so the composite devices works. So the first part of the answer, exporting the configuration does not really apply her. The pin and peripherals configuration works already.