This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Composite device starting from USBD example

Hi everyone,

I'm starting from USBD example and I want to implement a composite device.

If I want to implement a composite device I have to add one interface and then the related descriptor, is it enough?

Thanks

BR

Parents
  • Hi

    There is a composite example in the SDK showing how to add two different USB interfaces in the same example:
    \nRF5_SDK_17.0.2_d674dde\examples\peripheral\usbd_hid_composite

    The principle is the same for other USB classes (such as CDC or MSC), you just need to initialize multiple USB classes in the init phase. 

    You also need to ensure that you assign unique USB endpoints to the different classes, so there is no conflict. 

    As I mentioned in the other case I think it is important first to investigate if a composite device is really needed in your application. It might be a single CDC class is sufficient. 

    Best regards
    Torbjørn

Reply
  • Hi

    There is a composite example in the SDK showing how to add two different USB interfaces in the same example:
    \nRF5_SDK_17.0.2_d674dde\examples\peripheral\usbd_hid_composite

    The principle is the same for other USB classes (such as CDC or MSC), you just need to initialize multiple USB classes in the init phase. 

    You also need to ensure that you assign unique USB endpoints to the different classes, so there is no conflict. 

    As I mentioned in the other case I think it is important first to investigate if a composite device is really needed in your application. It might be a single CDC class is sufficient. 

    Best regards
    Torbjørn

Children
No Data
Related