Skip to main content
Associate
April 15, 2024
Question

How to implement composite USB profile on STM32WB5mmg?

  • April 15, 2024
  • 3 replies
  • 1878 views

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?

3 replies

Technical Moderator
April 15, 2024

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 Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
nitinhAuthor
Associate
April 16, 2024

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

Technical Moderator
September 6, 2024
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.Best regards,FBL
Technical Moderator
April 24, 2024

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 Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
Senior
April 24, 2024

Hi @nitinh ,

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

nitinhAuthor
Associate
April 25, 2024

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
April 26, 2024

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.