Add CDC device to CX3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi 

I was able to add the CDC to the CX3 UVC project correctly, but I still don't understand the variation of the   0x39, 0x01,//0xe5,0x00, /* Length of this descriptor and all sub descriptors */   parameter in the descriptor,hope someone can help me to answer it,Thank you

yaqi_4776616_0-1621491067676.png

Now that the parameters in my descriptor have changed I don't know how I should change them

yaqi_4776616_1-1621491108554.png

Regards,

Yaqi

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

In the configuration descriptor, the /* Length of this descriptor and all sub descriptors */ field is expected to hold the length of all the descriptors which includes UVC interface related descriptors and CDC  interface related descriptors.

As per the reference snippet, the /* Length of this descriptor and all sub descriptors */ is changed from 0xe5 (length of UVC descriptors) to 0x0139 (total length of UVC + CDC descriptors) which means 0x54 is the length CDC interface.

So, for the new configuration /* Length of this descriptor and all sub descriptors */ will be 0xda + 0x54 = 0x012E

Also, the number interfaces (/* Number of interfaces */) will change from 2 to 4 as 2 more CDC interfaces will be added.

You can refer to this KBA https://community.cypress.com/t5/Knowledge-Base-Articles/Adding-Communication-Device-Class-Interface...

Regards,
Rashi

View solution in original post

0 Likes
1 Reply
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

In the configuration descriptor, the /* Length of this descriptor and all sub descriptors */ field is expected to hold the length of all the descriptors which includes UVC interface related descriptors and CDC  interface related descriptors.

As per the reference snippet, the /* Length of this descriptor and all sub descriptors */ is changed from 0xe5 (length of UVC descriptors) to 0x0139 (total length of UVC + CDC descriptors) which means 0x54 is the length CDC interface.

So, for the new configuration /* Length of this descriptor and all sub descriptors */ will be 0xda + 0x54 = 0x012E

Also, the number interfaces (/* Number of interfaces */) will change from 2 to 4 as 2 more CDC interfaces will be added.

You can refer to this KBA https://community.cypress.com/t5/Knowledge-Base-Articles/Adding-Communication-Device-Class-Interface...

Regards,
Rashi
0 Likes