Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CY7C68013A stops to fill FIFO buffers randomly

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



CY7C68013A stops to fill FIFO buffers randomly
Moderator:
RSKV

Post Reply
Follow this topic



CY7C68013A stops to fill FIFO buffers randomly

ademenev posted on 25 Sep 2012 10:57 PM PST
Senior Member
12 Forum Posts

Hi all

I am using CY7C68013A with EP2 set up as iso OUT endpoint. The data from FIFO buffers is read by external synchronous master (CPLD). The problem is that at random times FLAGA output configured as actile low EP2 empty flag becomes zero, and stays acitve, while host continues sending data to EP2, until I reset the CY7C68013A and reload the firmware.

 

What can be the reason of such behavior?




Re: CY7C68013A stops to fill FIFO buffers randomly

ademenev posted on 25 Sep 2012 11:00 PM PST
Senior Member
12 Forum Posts

Also, EP2 interrupt stops to trigger as well



Re: CY7C68013A stops to fill FIFO buffers randomly

ademenev posted on 25 Sep 2012 11:21 PM PST
Senior Member
12 Forum Posts

Here is the waveforms the FPGA generates

Each read cycle is 2 words per RD active. Host always sends packets which are multiple of 4 bytes.

FLAGA is sampled on falling edges of IOCLK, and if FLAGA is not active (FIFO not empty,  then SLOE is activated, then RD is activated on next  IOCLK falling edge. IOCLK freq is 6.25 MHz



Re: CY7C68013A stops to fill FIFO buffers randomly

Gayathri posted on 26 Sep 2012 11:39 PM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Please share things like in what mode (Auto/Manual) FX2LP is operating? Can you please paste your code here. I would like to take a look.

 

Regards,

Gayathri



Re: CY7C68013A stops to fill FIFO buffers randomly

ademenev posted on 26 Sep 2012 12:09 AM PST
Senior Member
12 Forum Posts

This is the initialization code:

    REVCTL = 0x00;
    SYNCDELAY();
    IFCONFIG = 0x03; // ext. clock, slave FIFO
    SYNCDELAY();
    EP1OUTCFG &= ~0x7F;
    SYNCDELAY();
    EP1INCFG &= ~0x7F;
    SYNCDELAY();
    EP4CFG &= ~0x7F;
    SYNCDELAY();
    EP6CFG &= ~0x7F;
    SYNCDELAY();
    EP8CFG &= ~0x7F;
    SYNCDELAY();
    EP4FIFOCFG = 0;
    SYNCDELAY();
    EP6FIFOCFG = 0;
    SYNCDELAY();
    EP8FIFOCFG = 0;
    SYNCDELAY();
    EP2FIFOCFG = 0x11; // Auto, wordwide
    SYNCDELAY();
    PINFLAGSAB = 0x08;

    //       Valid      Out        ISO        1024       QuadBuf
    EP2CFG = (1 << 7) | (0 << 6) | (1 << 4) | (1 << 3) | (0 << 0);
    SYNCDELAY();
    FIFORESET = 0x80;
    SYNCDELAY();
    FIFORESET = 0x82;
    SYNCDELAY();
    FIFORESET = 0x00;
    SYNCDELAY();
    EP2BCL = 0x80;
    SYNCDELAY();
    EP2BCL = 0x80;
    SYNCDELAY();
    EP2BCL = 0x80;
    SYNCDELAY();
    EP2BCL = 0x80;

    //debug pin
    OEA = 0x03;

 

And this code is executed when host selects interface:

        FIFORESET = 0x80;
        SYNCDELAY();
        FIFORESET = 0x82;
        SYNCDELAY();
        FIFORESET = 0x00;
        SYNCDELAY();

        TOGCTL = 0x02;
        SYNCDELAY();
        TOGCTL = 0x22;

        EP2BCL = 0x80;
        SYNCDELAY();
        EP2BCL = 0x80;
        SYNCDELAY();
        EP2BCL = 0x80;
        SYNCDELAY();
        EP2BCL = 0x80;

 



Re: CY7C68013A stops to fill FIFO buffers randomly

Gayathri posted on 28 Sep 2012 10:08 PM PST
Cypress Employee
428 Forum Posts

Hi, 

 

Please try replacing

    FIFORESET = 0x80;
    SYNCDELAY();
    FIFORESET = 0x82;
    SYNCDELAY();
    FIFORESET = 0x00;
    SYNCDELAY();

with

    FIFORESET = 0x80;
    SYNCDELAY();
    FIFORESET = 0x02;
    SYNCDELAY();
    FIFORESET = 0x00;
    SYNCDELAY();

 

Regards,

Gayathri



Re: CY7C68013A stops to fill FIFO buffers randomly

ademenev posted on 28 Sep 2012 09:20 PM PST
Senior Member
12 Forum Posts

If I do so, FLAGA is always active (FIFO empty)



Re: CY7C68013A stops to fill FIFO buffers randomly

ademenev posted on 29 Sep 2012 06:19 PM PST
Senior Member
12 Forum Posts

I have noticed that when this problem occurs, ISOEP2 bit in USBERRIRQ is set



Re: CY7C68013A stops to fill FIFO buffers randomly

Gayathri posted on 07 Oct 2012 09:20 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Please cerate a tech support case at www.cypress.com, so that and one of engineers can take a look at it and help yo out.

 

regards,

Gayathri






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: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20