Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CY7C68013A : EZ-USB FX2 packet data is lost 512*N byte data

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



CY7C68013A : EZ-USB FX2 packet data is lost 512*N byte data
Moderator:
RSKV

Post Reply
Follow this topic



CY7C68013A : EZ-USB FX2 packet data is lost 512*N byte data

shutech4 posted on 04 Oct 2010 1:46 AM PST

1 Forum Post

Hi all,

I created the system that 4k byte data is transferred through EZ-USB bulk transfer. FPGA (target side) create 4k byte data created and host side received data.


But we sometimes found that EZ-USB FX2 packet data is lost 512*N byte data. And packet reading time is sometimes takes 100msec or more. (usual case average is 16-17msec)


EZ-USB FX2 has two 512 byte buffer that is used as FIFO. I guess to have it overwritten unexpectedly.

This same experience that someone for?

And how you resolved?

 

The following are the details.
Environmental
FPGA: Actel APA-450-BG456
Driver: Windows almost as a sample using the Bulk Transfer
PC OS: WinXP
USB Target: 512byte * 2 FIFO memory used in


System Specifications
• USB Bulk Transfer
• Baud rate is about 2Mbps
• FPGA allows every 16msec burn data to create a 4K SRAM save nearly
• FPGA look at the USB Overflow flag Overflow if not designed to write data
• Host-side applications, a simple data earnestly Read

worrisome phenomenon
• The data of received at the host is 512*N bytes lost
• Read by the host, but sometimes time-consuming than the 100msec
Read the host side code
    ResetEvent(h->overlappedIn.hEvent);
    h->overlappedIn.Internal = 0;
 
    success = ReadFile(h->handleIn,
                       pData,
                       maxLength,
                       pReadLength,
                       &h->overlappedIn);
 
    if (!success) {
        if ( GetLastError() != ERROR_IO_PENDING ) {
            DebugVal("ReadFile Error = %d", GetLastError(), DEBUG_LEVEL_ERR);
            return DEV_DEVICE_IO_ERROR;
        }
    }
 
    waitResult = WaitForSingleObject(h->overlappedIn.hEvent,timeOut);
 
    if (waitResult == WAIT_TIMEOUT) {
        CancelIo(h->handleIn);
        DebugMsg("ReadFile Error = WAIT_TIMEOUT", DEBUG_LEVEL_ERR);
        return DEV_TIMEOUT;
    }
 
    GetOverlappedResult(h->handleIn,&h->overlappedIn,pReadLength,FALSE);

 




Re: CY7C68013A : EZ-USB FX2 packet data is lost 512*N byte data

JLEE posted on 23 Nov 2010 12:00 PM PST

1 Forum Post

I have similar if not exact setup and see the same intermittent errors.  Interested to see solution.



Re: CY7C68013A : EZ-USB FX2 packet data is lost 512*N byte data

aasi posted on 25 Feb 2011 03:08 AM PST
Cypress Employee
1090 Forum Posts

What is the type of endpoint used? Is flow control used on the FPGA-FX2LP interface i.e. check if buffer is available before sending data.

Regards,

Anand






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.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20