Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > USB 3.0 Control Endpoint test time problem

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



USB 3.0 Control Endpoint test time problem
Moderator:
RSKV

Post Reply
Follow this topic



USB 3.0 Control Endpoint test time problem

Juny posted on 31 Aug 2012 2:02 AM PST
Member
2 Forum Posts

Hi.

I have a question regarding Control Endpoint usage, because USB 3.0(CYUSB3014-BZX) enable only 1/4 speed of data transmission compared USB 2.0(CY7C68013A).
In other words, USB 3.0 is slower 4times than USB2.0

Now I programmed through SDK V1.1 and following is Callback Function source coding regarding Control Endpoint.

Indeed source is only the returns against  variables of error handling

At the PC application layer, I used only Read Function of CCyControlEndPoint.

  CyControlEndPoint->Read((PUCHAR )pParam, len);

And firmware, I used coding as following.

  /* Callback to handle the USB setup requests. */
  CyBool_t
  CyFxSlFifoApplnUSBSetupCB (
        uint32_t setupdat0,
        uint32_t setupdat1
    )
{
    /* Fast enumeration is used. Only class, vendor and unknown requests
     * are received by this function. These are not handled in this
     * application. Hence return CyFalse. */
//    return CyFalse;

    uint8_t attr, rqt, i2cAddr = 0;
    uint8_t param[4];
uint16_t value, index, length;
    CyBool_t isHandled = CyTrue;
    CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
uint8_t bytRet, i, read_byte;

    /* Parse the control request parameters. */
    attr    =  (uint8_t) (setupdat0 & 0x000000FF);
    rqt     =  (uint8_t)((setupdat0 & 0x0000FF00) >> 8);
    value   = (uint16_t) (setupdat0 >> 16);
    index   = (uint16_t) (setupdat1 & 0x0000FFFF);
    length  = (uint16_t) (setupdat1 >> 16);

    param[0] = (uint8_t) (value & 0x00FF);
    param[1] = (uint8_t) ((value & 0xFF00) >> 8);
    param[2] = (uint8_t) (index & 0x00FF);
    param[3] = (uint8_t) ((index & 0xFF00) >> 8);

   /* Fast enumeration is used. Only vendor is handled here. */
    if ((attr & CY_U3P_USB_TYPE_MASK) != CY_U3P_USB_VENDOR_RQT)
    {
        return CyFalse;
    }

    switch (rqt)
    {
         case erGETERRCODE:
              length = 1;
              glEp0Buffer[0] = GET_ERRORCODE();
              status = CyU3PUsbSendEP0Data(length, glEp0Buffer);
              break;

Best Rgds,

Juny




Re: USB 3.0 Control Endpoint test time problem

RSKV posted on 01 Sep 2012 10:10 PM PST
Cypress Employee
655 Forum Posts

Hi Juny,

I am interested to know the way you are measuring the speed of data transmission. Please let me know.

Thanks,

sai krishna.



Re: USB 3.0 Control Endpoint test time problem

Juny posted on 03 Sep 2012 04:07 AM PST
Member
2 Forum Posts

Hi RSKV

Read function of internal memory value get.

the same behavior with a thousand times, and used the average value is Test time

Performance measurement to use the "QueryPerformanceCounter function" of API

Best Rgds,

Juny






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.