5 Replies Latest reply on Aug 14, 2020 3:23 AM by YatheeshK_36

    USB Descriptor Generate Tool

    xixu_4093676

      I 'm trying to add one Endpoint descriptor into "CyUSBSSConfigDscr" based on my exist fx3 project ,

      But the device is not been identify by windows 10 with showing "Consistency check failed"  .

      It is difficult to check what's the error about my descriptor for me.

      Are there a USB Descriptor Generate Tool to use generate the USB Descriptor?

       

      Thanks,

      Martin.xu

        • 1. Re: USB Descriptor Generate Tool
          YatheeshK_36

          Hello,

           

          Please share your descriptor file for review.

           

          Make sure that the size field (wTotalLength) in the configuration descriptors is updated with the total length of all descriptors under that configuration.

          When an additional Endpoint is added under a configuration, the size filed in the configuration descriptors should be updated by adding the length of the new endpoint descriptor to the preexisting length.

           

          We do not have any custom tool to generate descriptors.

           

          Thanks,

          Yatheesh

          • 2. Re: USB Descriptor Generate Tool
            xixu_4093676

            Hello,

             

                  Thanks for your replay.

                  There is some issue with our windows driver, the  config descriptor is correctly.

             

            Thanks,

            Martin

            • 3. Re: USB Descriptor Generate Tool
              YatheeshK_36

              Hello Martin,

               

              If the issue still persists, please let me know if you are using any standard class implementation like UVC, CDC etc.. or only vendor class.

              Also, please do share the descriptor .c file with us.

               

              Thanks,

              Yatheesh

              • 4. Re: USB Descriptor Generate Tool
                xixu_4093676

                Hello Yatheesh,

                   

                    Yes, We also hope to add one Virtual COM Port to implementation output debug information .

                    Refer to the sample Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbuart

                    Update the my project Super speed Configuration Descriptor, It look like it is not working.

                    would you help us review it?

                 

                   

                /* Super Speed Configuration Descriptor */

                const uint8_t CyFxUSBSSConfigDscr[] =

                    {

                 

                 

                        /* Configuration Descriptor Type */

                        0x09,                           /* Descriptor Size */

                        CY_U3P_USB_CONFIG_DESCR,        /* Configuration Descriptor Type */

                #ifdef ENABLE_USB_TO_UART      

                        0xB3,0x00,                      /* Length of this descriptor and all sub descriptors */

                #else

                        0x67,0x00,                      /* Length of this descriptor and all sub descriptors */

                #endif

                        0x03,                           /* Number of interfaces */

                        0x01,                           /* Configuration number */

                        0x00,                           /* Configuration string index */

                        0x80,                           /* Config characteristics - Bus powered */

                        0x32,                           /* Max power consumption of device (in 8mA unit) : 400mA */

                 

                 

                 

                 

                    /* Interface descriptor */

                    0x09,                           /* Descriptor size */

                    CY_U3P_USB_INTRFC_DESCR,        /* Interface Descriptor type */

                    0x00,                           /* Interface number */

                    0x00,                           /* Alternate setting number */

                        0x05,                           /* Number of endpoints */

                    0xEF,                           /* Device class */

                0x02,                           /* Device sub-class */

                0x01,                           /* Device protocol */

                    0x00,                           /* Interface descriptor string index */

                 

                 

                    /*Class-Specific Device Info Descriptor*/ //U3V新增

                        0x14, /* Descriptor size */

                    0x24, /* Descriptor type U3V_INTERFACE = 24h */

                    0x01, /* Descriptor Sub type */

                    0x00,0x00,0x01,0x00, /* GenCP version */

                    0x00,0x00,0x01,0x00, /* USB3 Vision version */

                    0x04, /* Index to USB3 Vision GUID string  */

                        0x05,                           /* Index to Vendor Name string */

                    0x06,                           /* Index to Model Name string */

                    0x07,                           /* Index to Family Name string */

                    0x08,                           /* Index to Device Version string */

                    0x09,                           /* Index to Manufacturer Info string */

                    0x0A,                           /* Index to Serial Number string */

                    0x0B,                           /* Index to User Defined Name string */

                    0x08,                           /* Bitmask indicating the bus speeds supported by this device */

                 

                 

                    /* Endpoint descriptor for producer EP */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    CY_FX_EP_PRODUCER(1),           /* Endpoint address and description */ 

                    CY_U3P_USB_EP_INTR,             /* Bulk endpoint type */

                    0x00,0x04,                      /* Max packet size = 1024 bytes */

                    0x00,                           /* Servicing interval for data transfers : 0 for bulk */

                 

                 

                    /* Super speed endpoint companion descriptor for producer EP */ /

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 0: burst 1 packet at a time */

                    0x00,                           /* Max streams for bulk EP = 0 (No streams) */

                    0x00,0x00,                      /* Service interval for the EP : 0 for bulk */

                 

                 

                    /* Endpoint descriptor for consumer EP */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    CY_FX_EP_CONSUMER(1),           /* Endpoint address and description */

                    CY_U3P_USB_EP_INTR,             /* Bulk endpoint type */

                    0x00,0x04,                      /* Max packet size = 1024 bytes */

                    0x00,                            /* Servicing interval for data transfers : 0 for bulk */

                 

                 

                    /* Super speed endpoint companion descriptor for producer EP */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 0: burst 1 packet at a time */

                    0x00,                           /* Max streams for bulk EP = 0 (No streams) */

                    0x00,0x00,                      /* Service interval for the EP : 0 for bulk */

                 

                 

                 

                 

                 

                 

                    /* Endpoint descriptor for consumer EP */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    CY_FX_EP_PRODUCER(2),              /* Endpoint address and description */

                    CY_U3P_USB_EP_BULK,             /* Bulk endpoint type */

                    0x00,0x04,                      /* Max packet size = 512 bytes */

                    0x00,                            /* Servicing interval for data transfers : 0 for bulk */

                 

                 

                    /* Super speed endpoint companion descriptor for producer EP */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 0: burst 1 packet at a time */

                    0x00,                           /* Max streams for bulk EP = 0 (No streams) */

                    0x00,0x00,                      /* Service interval for the EP : 0 for bulk */

                 

                 

                    /* Endpoint descriptor for consumer EP */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    CY_FX_EP_CONSUMER(2),              /* Endpoint address and description */

                    CY_U3P_USB_EP_BULK,             /* Bulk endpoint type */

                    0x00,0x04,                      /* Max packet size = 1024 bytes */

                    0x00,                            /* Servicing interval for data transfers : 0 for bulk */

                 

                 

                    /* Super speed endpoint companion descriptor for producer EP */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 0: burst 1 packet at a time */

                    0x00,                           /* Max streams for bulk EP = 0 (No streams) */

                    0x00,0x00,                      /* Service interval for the EP : 0 for bulk */

                 

                 

                    /* Endpoint descriptor for consumer EP */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    CY_FX_EP_CONSUMER(3),              /* Endpoint address and description */

                    CY_U3P_USB_EP_BULK,             /* Bulk endpoint type */

                    0x00,0x04,                      /* Max packet size = 1024 bytes */

                    0x00,                            /* Servicing interval for data transfers : 0 for bulk */

                   

                     /* Super speed endpoint companion descriptor for producer EP */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 0: burst 1 packet at a time */

                    0x00,                           /* Max streams for bulk EP = 0 (No streams) */

                    0x00,0x00                      /* Service interval for the EP : 0 for bulk */

                   

                #ifdef ENABLE_USB_TO_UART

                , /* Communication Interface descriptor */

                    0x09,                           /* Descriptor size */

                    CY_U3P_USB_INTRFC_DESCR,        /* Interface Descriptor type */

                    0x01,                           /* Interface number */

                    0x00,                           /* Alternate setting number */

                    0x01,                           /* Number of endpoints */

                    0x02,                           /* Interface class : Communication interface */

                    0x02,                           /* Interface sub class */

                    0x01,                           /* Interface protocol code */

                    0x00,                           /* Interface descriptor string index */

                 

                 

                    /* CDC Class-specific Descriptors */

                    /* Header functional Descriptor */

                    0x05,                           /* Descriptors length(5) */

                    0x24,                           /* Descriptor type : CS_Interface */

                    0x00,                           /* DescriptorSubType : Header Functional Descriptor */

                    0x10,0x01,                      /* bcdCDC : CDC Release Number */

                 

                 

                    /* Abstract Control Management Functional Descriptor */

                    0x04,                           /* Descriptors Length (4) */

                    0x24,                           /* bDescriptorType: CS_INTERFACE */

                    0x02,                           /* bDescriptorSubType: Abstract Control Model Functional Descriptor */

                    0x02,                           /* bmCapabilities: Supports the request combination of Set_Line_Coding,

                                                       Set_Control_Line_State, Get_Line_Coding and the notification Serial_State */

                 

                 

                    /* Union Functional Descriptor */

                    0x05,                           /* Descriptors Length (5) */

                    0x24,                           /* bDescriptorType: CS_INTERFACE */

                    0x06,                           /* bDescriptorSubType: Union Functional Descriptor */

                    0x00,                           /* bMasterInterface */

                    0x01,                           /* bSlaveInterface */

                 

                 

                    /* Call Management Functional Descriptor */

                    0x05,                           /*  Descriptors Length (5) */

                    0x24,                           /*  bDescriptorType: CS_INTERFACE */

                    0x01,                           /*  bDescriptorSubType: Call Management Functional Descriptor */

                    0x00,                           /*  bmCapabilities: Device sends/receives call management information

                                                        only over the Communication Class Interface. */

                    0x01,                           /*  Interface Number of Data Class interface */

                 

                 

                    /* Endpoint Descriptor(Interrupt) */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    /*CY_FX_EP_INTERRUPT*/0x84,     /* Endpoint address and description */

                    CY_U3P_USB_EP_INTR,             /* Interrupt endpoint type */

                    0x40,0x00,                      /* Max packet size = 1024 bytes */

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

                 

                 

                    /* Super speed endpoint companion descriptor for interrupt endpoint */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a Burst : 1 */

                    0x00,                           /* Mult.: Max number of packets : 1 */

                    0x40,0x00,                      /* Bytes per interval : 1024 */

                 

                 

                    /* Data Interface Descriptor */

                    0x09,                           /* Descriptor size */

                    CY_U3P_USB_INTRFC_DESCR,        /* Interface Descriptor type */

                    0x02,                           /* Interface number */

                    0x00,                           /* Alternate setting number */

                    0x02,                           /* Number of endpoints */

                    0x0A,                           /* Interface class: Data interface */

                    0x00,                           /* Interface sub class */

                    0x00,                           /* Interface protocol code */

                    0x00,                           /* Interface descriptor string index */

                 

                 

                    /* Endpoint Descriptor(BULK-PRODUCER) */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    0x05,                           /* Endpoint address and description */

                    CY_U3P_USB_EP_BULK,             /* BULK endpoint type */

                    0x00,0x04,                      /* Max packet size = 1024 bytes */

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

                 

                 

                    /* Super speed endpoint companion descriptor for producer ep */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 1 */

                    0x00,                           /* Mult.: Max number of packets : 1 */

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

                 

                 

                    /* Endpoint Descriptor(BULK- CONSUMER) */

                    0x07,                           /* Descriptor size */

                    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */

                    0x85,                           /* Endpoint address and description */

                    CY_U3P_USB_EP_BULK,             /* BULK endpoint type */

                    0x00,0x04,                      /* Max packet size = 1024 bytes */

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

                 

                 

                    /* Super speed endpoint companion descriptor for consumer ep */

                    0x06,                           /* Descriptor size */

                    CY_U3P_SS_EP_COMPN_DESCR,       /* SS endpoint companion descriptor type */

                    0x00,                           /* Max no. of packets in a burst : 1 */

                    0x00,                           /* Mult.: Max number of packets : 1 */

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

                #endif

                 

                 

                    };

                 

                 

                Thanks,

                Martin

                • 5. Re: USB Descriptor Generate Tool
                  YatheeshK_36

                  Hello Martin,

                   

                  I tired you descriptors on the cyfxusbuart example and the enumeration is proper.

                   

                   

                   

                  Thanks,

                  Yatheesh