Add more alternate setting

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

cross mob
likec_1981161
Level 2
Level 2
First like received

Hi

I add the other alternate setting(Interface 1,Alternate setting 2)  but the USB descriptor didn't detect this setting.

The descriptor of the alternate_1 and alternate_2 are shown as below:

*Interface 1,Alternate setting 1

    /* Standard video streaming interface descriptor (Interface 1,Alternate setting 1) */

    0x09,                           /* Descriptor size */

    CY_U3P_USB_INTRFC_DESCR,        /* Interface descriptor type */

    0x01,                           /* Interface number */

    0x01,                           /* Alternate setting number */

    0x01,                           /* Number of end points : 1 ISO EP */

    0x0E,                           /* Interface class : CC_VIDEO */

    0x02,                           /* Interface sub class : CC_VIDEOSTREAMING */

    0x00,                           /* Interface protocol code : Undefined */

    0x00,                           /* Interface descriptor string index */

    /* Endpoint Descriptor for isochronous Streaming Video Data */

    0x07,                               /* Descriptor size */

    CY_U3P_USB_ENDPNT_DESCR,            /* Endpoint Descriptor Type */

    CX3_EP_VIDEO,                  /* Endpoint address and description: EP 3 IN */

    CY_U3P_USB_EP_ISO | 0x04,           /* isochronous End point */

    0x00,

    0x04,                            /* Max packet size is 1024 bytes. */

    0x01,                               /* Servicing interval for data transfers */

    /* Super Speed Endpoint Companion Descriptor */

    0x06,                               /* Descriptor size */

    CY_U3P_SS_EP_COMPN_DESCR,           /* SS Endpoint Companion Descriptor Type */

    CX3_EP_SUPER_SPEED_BURST_LEN,       /* Max no. of packets in a burst */

    CX3_EP_SUPER_SPEED_MULT,            /* Mult setting: Number of bursts per service interval. */

    0x00,

    0x90, /* Bytes per interval : 1024 */

*Interface 1,Alternate setting 2

    /* Standard video streaming interface descriptor (Interface 1,Alternate setting 2) */

    0x09,                           /* Descriptor size */

    CY_U3P_USB_INTRFC_DESCR,        /* Interface descriptor type */

    0x01,                           /* Interface number */

    0x02,                           /* Alternate setting number */

    0x01,                           /* Number of end points : 1 ISO EP */

    0x0E,                           /* Interface class : CC_VIDEO */

    0x02,                           /* Interface sub class : CC_VIDEOSTREAMING */

    0x00,                           /* Interface protocol code : Undefined */

    0x00,                           /* Interface descriptor string index */

    /* Endpoint Descriptor for isochronous Streaming Video Data */

    0x07,                               /* Descriptor size */

    CY_U3P_USB_ENDPNT_DESCR,            /* Endpoint Descriptor Type */

    CX3_EP_VIDEO,                  /* Endpoint address and description: EP 3 IN */

    CY_U3P_USB_EP_ISO | 0x04,           /* isochronous End point */

    0x00,

    0x04,                            /* Max packet size is 1024 bytes. */

    0x01,                               /* Servicing interval for data transfers */

    /* Super Speed Endpoint Companion Descriptor */

    0x06,                               /* Descriptor size */

    CY_U3P_SS_EP_COMPN_DESCR,           /* SS Endpoint Companion Descriptor Type */

    CX3_EP_SUPER_SPEED_BURST_LEN,       /* Max no. of packets in a burst */

    CX3_EP_SUPER_SPEED_MULT,            /* Mult setting: Number of bursts per service interval. */

    0x00,

    0x90, /* Bytes per interval : 1024 */

If you can help on this issue would be greatly appreciated.

kelvin

0 Likes
1 Solution

Hello Kelvin,

To switch the alternate setting, the USB standard request (SET_INTERFACE) with the appropriate alternate setting number has to be issued over the control endpoint. The FX3 library itself handles the SET_INTERFACE request.

Please refer to the below link for details on SET_INTERFACE request.

https://www.beyondlogic.org/usbnutshell/usb1.shtml

Best regards,

Srinath S

View solution in original post

0 Likes
7 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Kelvin,

Please check if you have updated the configuration descriptors of all speeds of operation for the additional interface. I find that you have attached the code snippet for the SuperSpeed mode but not others. In case your device enumerates other than SuperSpeed, the mentioned descriptors are not included rather the descriptors corresponding to that particular speed of operation. Kindly, recheck.

Best regards,

Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Srinath S

The attachment is our USB descriptor that is enumerated from PC and the alternate_2 doesn't show.

kelvin.

0 Likes

Hello Kelvin,

Can you please share the source file of the descriptor details?

Best regards,

Srinath S

0 Likes

Hi Srinath S

We resolve this issue.

Is there any tool to changed the other alternate setting?

Thanks

kelvin

0 Likes

Hello Kelvin,

To add/modify alternate setting, the descriptor information in the device firmware has to be modified. The FX3 firmware can be modified using the ezUsbSuite (Eclipse based IDE) that comes with the FX3 SDK.

Best regards,
Srinath S

0 Likes

Hi Srinath S

Sorry, I don't explain clearly.

When the device is detected by Host(PC),it will choose one of packet size config(alternate setting).

How to change the other alternate setting in Host(PC)?

Thanks

kelvin

0 Likes

Hello Kelvin,

To switch the alternate setting, the USB standard request (SET_INTERFACE) with the appropriate alternate setting number has to be issued over the control endpoint. The FX3 library itself handles the SET_INTERFACE request.

Please refer to the below link for details on SET_INTERFACE request.

https://www.beyondlogic.org/usbnutshell/usb1.shtml

Best regards,

Srinath S

0 Likes