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

PSoC™ 6 Forum Discussions

Bart
Level 1
Level 1
First question asked Welcome!

I am new to the Infineon/Cypress ecosystem. Please be patient with me.

I have a CY8PROTO-062-4343W PSoC 6 board and am using Eclipse IDE for ModusToolbox.

What I am trying to create is a composite USB device based on PSoC 6. I need two in/out audio channels and two CDC ports. I think I know what I have to do. I get the general idea of a composite device. I need to remove the HID part, add two CDCs, and add three IADs: one for the audio part and one for each CDC.

I found a post that is related to what I am trying to do: https://community.infineon.com/t5/PSoC-6/USB-Composite-device-Audio-CDC/m-p/290605 I am also trying to use USB_Audio_Device_FreeRTOS as a starting point, and while I need two CDCs, even one would be a good starting point. The proposed solution was a descriptor in an XML format. I tried manually copying it to the USB Configurator and, sadly, failed:

1) In the top level descriptor, the XML contains the following values:

<bDeviceClass>0x00</bDeviceClass>
<bDeviceSubClass>0x00</bDeviceSubClass>
<bDeviceProtocol>0x00</bDeviceProtocol>
The USB Configurator complains (as far as I can tell, correctly) that the values should be 0xEF, 0x02 and 0x01, respectively. It does not let me save the configuration until I enter the required values.

2) Both audio and CDC try to use endpoint EP2 IN and the USB configurator complains again. I had to change the CDC endpoint to EP5

Even with these changes, it does not work. Windows 10 says "This device cannot start. (Code 10){Operation Failed} The requested operation was unsuccessful."

What am I doing wrong?

Thanks!
Bart

 

 

 

0 Likes
1 Solution
Ekta
Moderator
Moderator
Moderator
250 solutions authored 100 likes received 250 sign-ins

Hello @Bart 

1. I tried changing the Device Class, Device SubClass, and Device Protocol to 0xEF, 0x02, and 0x01 respectively as correctly suggested by the USB Device configurator, and was able to get the device to enumerate.

Ekta_1-1641819368425.png

 One issue that I noticed with your device descriptor is that in the first Interface association descriptor you are setting the bInterfaceCount value as 3 although there are only two Audio interfaces below it can you try changing it to 2 and see if this resolves the issue.

Ekta_2-1641819509822.png

 

2. Regarding point 2, I guess there is an error with the USB descriptor XML file attached. For a Endpoint Descriptor the selected endpoint should not be selected in any other endpoint descriptor under the same Alternate Setting or by a different interface within a configuration. This is also mentioned in the USBFS datasheet.

Ekta_0-1641818577264.png

However,  an endpoint number can be shared by multiple alternate settings under one Interface. This is because only one of the Alternate settings will be active at a time.

Best Regards
Ekta

View solution in original post

0 Likes
1 Reply
Ekta
Moderator
Moderator
Moderator
250 solutions authored 100 likes received 250 sign-ins

Hello @Bart 

1. I tried changing the Device Class, Device SubClass, and Device Protocol to 0xEF, 0x02, and 0x01 respectively as correctly suggested by the USB Device configurator, and was able to get the device to enumerate.

Ekta_1-1641819368425.png

 One issue that I noticed with your device descriptor is that in the first Interface association descriptor you are setting the bInterfaceCount value as 3 although there are only two Audio interfaces below it can you try changing it to 2 and see if this resolves the issue.

Ekta_2-1641819509822.png

 

2. Regarding point 2, I guess there is an error with the USB descriptor XML file attached. For a Endpoint Descriptor the selected endpoint should not be selected in any other endpoint descriptor under the same Alternate Setting or by a different interface within a configuration. This is also mentioned in the USBFS datasheet.

Ekta_0-1641818577264.png

However,  an endpoint number can be shared by multiple alternate settings under one Interface. This is because only one of the Alternate settings will be active at a time.

Best Regards
Ekta

0 Likes