Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CTL0 counting with Logic analyzer is incorrect as GPIFTCBx.

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



CTL0 counting with Logic analyzer is incorrect as GPIFTCBx.
Moderator:
RSKV

Post Reply
Follow this topic



CTL0 counting with Logic analyzer is incorrect as GPIFTCBx.

acorrd posted on 27 Aug 2011 12:24 AM PST
Senior Member
12 Forum Posts


Hello,

I'm working witt CY7C68013A. It is transfer 2MB data to host.
EP6 is used as input endpoint.

In flow state, I've set as below.
DataXFER : Rising edge
Master strobe half period : 2
Flow logic : if(FIFOflag=1 and FifoFlag=1)
               then CTL0 = 1;
      else CTL0 = 0;
  
problem is

With Logic analyzer, I've counted CTL0 pin's signal.
It's last counting number is 1023999, not 1024000.

In host program , WaitForXfer() is return correctly within about 125msec.
in my think, 125msec is correct consumed time to transfer 2MB.
 

Ant the FinishDataXfer's inLen after function return  is 1024000.

1. Why does Physical counting is differ to others?


2. Our memory will output data on falling edge of CTL0,
then MCU will get data on rising edge.
is it correct?


3. in my test, bulk speed for Read is 16MB/sec . but on other documents,
 their circuit has about 40MB/sec.
 I've attached working file.


viod host_read_code(){
...................

  
  inlen=1024000*2;

  SendCmd(VX_B3);//set GPIFTCBx as 1024000(0x0F_A000) and trigger GPIF

  UCHAR  *inContext = InEndpt->BeginDataXfer(inData,inlen,&inOvLap);
  
  InEndpt->WaitForXfer(&inOvLap,10000);
  
  
  success = InEndpt->FinishDataXfer(inData,inlen, &inOvLap,inContext);

  SendCmd(VX_B4);//vendor cmd. stop upload.

...................
}


//Below is MCU code.
BOOL DR_VendorCmnd(void){

..............


case VX_B3: // enable IN transfers
 {
  
  *EP0BUF = VX_B3;
    EP0BCH = 0;
  EP0BCL = 1;
  EP0CS |= bmHSNAK;

  SYNCDELAY;
  FIFORESET = 0x06;  // reset EP6 FIFO

//=====================================

  SYNCDELAY;
  GPIFTCB3 = 0x00;
  SYNCDELAY;
      GPIFTCB2 = 0x0F;
  SYNCDELAY;
      GPIFTCB1 = 0xA0;
        SYNCDELAY;
        GPIFTCB0 = 0x00;
        SYNCDELAY;
   
  Setup_FLOWSTATE_Read();
    
        SYNCDELAY;
  //read transaction & ep 6.
        GPIFTRIG = GPIFTRIGRD | GPIF_EP6; // launch GPIF FIFO READ Transaction to EP6 FIFO
      SYNCDELAY;

 
   break;
    }


 




Re: CTL0 counting with Logic analyzer is incorrect as GPIFTCBx.

Gayathri posted on 29 Aug 2011 01:11 AM PST
Cypress Employee
428 Forum Posts

 Hi,

As I went through your firmware, I noticed that you had a value of 0x3E into FLOWLOGIC register. According to what you said, to make the logic as if(FIFOflag=1 and FifoFlag=1) , you have to assign it as 0x36. I just wanted to bring this into your notice first.

Then about the question:  Our memory will output data on falling edge of CTL0, then MCU will get data on rising edge.
is it correct? : As long as the timing of ext FIFO and the FX2LP is met, there is nothing to worry about keeping it so.

 

Regards,

Gayathri



Re: CTL0 counting with Logic analyzer is incorrect as GPIFTCBx.

Gayathri posted on 29 Aug 2011 06:06 AM PST
Cypress Employee
428 Forum Posts

 Hi,

Do you mean to say that the actual number of bytes transferred is correct (i.e 1024000 words, same as the value returned by FinishXferData function) and that the only in the logic analyzer, it shows up as different? Or do you mean to say that there is 1Byte missing in the original data transferred?

As you said, I have also seen upto ~40MB/s throughput with FX2LP. Did you use the Scremer/Streamer application that comes with Cypress Suite USB for checking the same? If not can you please check with same and let me know the result.

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