Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > endpoint discriptor file

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



endpoint discriptor file
Moderator:
RSKV

Post Reply
Follow this topic



endpoint discriptor file

Nazila posted on 12 Jan 2012 5:04 PM PST
Top Contributor
55 Forum Posts

Hi,

I would like to add the IN and OUT interrupt endpoints to the Slave FIFO example (C:\cypress\FX3 SDK\firmware\slavefifo\slfifosync). What should I modify in the descriptor file "cyfxslfifousbdscr.c" so that it contains both information about the slave fifo and IN and OUT interrupt endpoints.

Thanks,

Nazila

P.S. I attached the file that I have been using for the Interrupt endpoint descriptor example.




Re: endpoint discriptor file

aasi posted on 13 Jan 2012 10:15 PM PST
Cypress Employee
1073 Forum Posts

You've change

1. the Interface descriptor to reflect the number of endpoints.

2. Add the endpoint descriptors under the corresponding interface descriptor

3. Change the length of the Configuration descriptor to account for the length increase due to the addition of endpoint descriptors.

Regards,

Anand



Re: endpoint discriptor file

raj8889 posted on 22 Nov 2012 05:25 AM PST
Senior Member
19 Forum Posts

Hii Anand,

I am trying to do the same I am trying to add an other out endpoint and also an other socket(consumer) in the syncslavefifo example I am having a problem in the configuration descriptor in the file (cyfxsfifousbdscr.c). may be the same error as u mentioned above how can I change the size can you give more information regarding it.

And if this changes are done will this example run.

 

 

Thanks in advance



Re: endpoint discriptor file

Lumpi6 posted on 22 Nov 2012 07:09 AM PST
Top Contributor
183 Forum Posts

Hi,

at the beginning of each configuration descriptor (FS, HS and SS) is the Configuration descriptor. Its size is in the always 0x09= 9 bytes long. Then you can see the descriptor type and then the "Length of this descriptor and all sub descriptors". In that length you have to add the amount of bytes you added with an additional endpoint descriptor. I have added a descriptor in the following example, see changes colored in red. The FS and HS descriptor have no companion descriptor so there you just have to add 7. Just compare the descriptor file in the slave fifo async example.

 

const uint8_t CyFxUSBSSConfigDscr[] __attribute__ ((aligned (32))) =
{
    /* Configuration descriptor */
    0x09,                           /* Descriptor size */
    CY_U3P_USB_CONFIG_DESCR,        /* Configuration descriptor type */
    (0x2C + 13),0x00,                      /* Length of this descriptor and all sub descriptors */
    0x01,                           /* 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 */
    0x02,                           /* Number of end points */
    0xFF,                           /* Interface class */
    0x00,                           /* Interface sub class */
    0x00,                           /* Interface protocol code */
    0x00,                           /* Interface descriptor string index */

    /* Endpoint descriptor for producer EP */
    0x07,                           /* Descriptor size */
    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */
    CY_FX_EP_PRODUCER,              /* 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,              /* 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 consumer 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 ADDITIONAL */
    0x07,                           /* Descriptor size */
    CY_U3P_USB_ENDPNT_DESCR,        /* Endpoint descriptor type */
    CY_FX_EP_CONSUMER_ADDITIONAL,              /* 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 consumer 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 */

};
 

regards,

lumpi



Re: endpoint discriptor file

raj8889 posted on 23 Nov 2012 12:21 AM PST
Senior Member
19 Forum Posts

Hello Lumpi,

Very clear thanks for your time

regards

pruthvi raj



Re: endpoint discriptor file

raj8889 posted on 04 Jan 2013 01:02 AM PST
Senior Member
19 Forum Posts

Hello Guys,

I want 2 producer endpoints and 2 consumer endpoints. I have changed the endpoint descriptor file as suggested by you.

Please tell me if there are any more changes to be made.

 



Re: endpoint discriptor file

raj8889 posted on 04 Jan 2013 03:52 AM PST
Senior Member
19 Forum Posts

The question continues while configuring endpoints and dma channel, should we create a endpoint configuration and Dma configuration for every endpoint used.

 

CyU3PEpConfig_t epCfg_1;CyU3PDmaChannelConfig_t dmaCfg_1;CyU3PEpConfig_t epCfg_2;CyU3PDmaChannelConfig_t dmaCfg_2;

 

 

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.