Skip to main content
Associate
Apr 15, 2024 9:25 AM UTC
Question

How to implement composite USB profile on STM32WB5mmg?

Hello,

I am trying to implement two CDC profile on STM32WB55xx controller. Since it has 8 endpoints, theoretically it should be possible. What should be the approach to achieve this?

This topic has been closed for replies.

8 replies

ST Technical Moderator
Apr 15, 2024 4:41 PM UTC

Hello @nitinh 

To support dual CDC class in single device, you have to add IAD (Interface Association Descriptor) to extend existing configuration descriptor. Then assign unique endpoints and update class handler to manage 2 CDC instances... Implement callback to handle data reception for CDC profiles. You can manage line coding control request ... and test each CDC profile independently with each UART instance.

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
nitinhAuthor
Associate
Apr 16, 2024 9:03 AM UTC

Thank you for the response. Do you have an example of this?

ST Technical Moderator
Sep 6, 2024 10:37 AM UTC
To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
ST Technical Moderator
Apr 24, 2024 10:57 AM UTC

Hi  @nitinh 

Currently we don't have a ready to use example developed by ST. You can check on GitHub similar examples.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Senior
Apr 24, 2024 3:49 PM UTC

Hi @nitinh ,

I have an example for STM32F103 with three CDC profiles. It uses C++ to generated the IAD's.

nitinhAuthor
Associate
Apr 25, 2024 4:02 PM UTC

Thanks, I'll check it out. I tried adding IADs and modified device descriptor to composite. After that it showed up on Windows Device Manager as two serial devices but I was not able to communicate over them. Also, the manufacturer was shown Microsoft instead of STMicroelctronics. 

Senior
Apr 26, 2024 8:30 AM UTC

Are you sure you defined the correct endpoints in the descriptor and use them correctly in your firmware? You can check using wireshark that the descriptor is correct, and that data is sent do the correct endpoint.