cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

Hi I have two endpoints with 2 separate report descriptors, right now I am checking the wDescriptorLength - which is setupdat1 & CY_U3P_USB_VALUE_MASK >> 16 which gives me the length (and + 0x40 for some reason) but I feel this is not a good way to determine which descriptor to send

is there another indication of which endpoint report descriptor is being requested?

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello,

Its nice to hear that the problem is solved. While sending report descriptors associated with 2 interfaces, the bRequest should correspond to  CY_U3P_USB_SC_GET_DESCRIPTOR, bReqType should be CY_FX_GET_REPORT_DESC and wIndex should properly select the particular interface whose report descriptor is to be sent. A sample code is attached below:

pastedImage_0.png

Please note that this code should be a part of the standard requests that are handled in the setup callback.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
Reply
4 Replies
New Contributor II

So just to add a little more detail to this question - the reason I ask is because I was sending the report descriptors based on that size, but on windows for some reason unbeknownst to me wDescriptorLength is requested as +0x40 the actual value reported on the configuration descriptor

On mac & linux the value is what's reported on the configuration descriptor - this means my firmware doesn't work on either windows or mac/linux unless I check for both 0x40 & actual length.

I have a suspicion that the report descriptors are supposed to be send in the order that they were defined in the config descriptor but I have not been able to verify this in any documentation

Thanks

0 Likes
Reply
Moderator
Moderator

Hello,

Please let me know which firmware are you mentioning about in this discussion.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
Reply
New Contributor II

The solution I found was from this stack overflow question:

https://stackoverflow.com/questions/52106252

0 Likes
Reply
Moderator
Moderator

Hello,

Its nice to hear that the problem is solved. While sending report descriptors associated with 2 interfaces, the bRequest should correspond to  CY_U3P_USB_SC_GET_DESCRIPTOR, bReqType should be CY_FX_GET_REPORT_DESC and wIndex should properly select the particular interface whose report descriptor is to be sent. A sample code is attached below:

pastedImage_0.png

Please note that this code should be a part of the standard requests that are handled in the setup callback.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
Reply