Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > reg manual mode in endpoint fifo

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



reg manual mode in endpoint fifo
Moderator:
RSKV

Post Reply
Follow this topic



reg manual mode in endpoint fifo

poorni posted on 24 Jan 2012 3:23 PM PST
Member
5 Forum Posts

 Hi there,

I wanted to know when we use manual mode, the flagb&c dont work is it?  I am writing a test sequence from my master which is a PLD to the slave fifo (microcontroller cy7c68013a). I can see the test data in the endpoint buffer (of the slave) but the flags and byte counts always read empty! Has anyone come across this before?

 

Thanks in advance




Re: reg manual mode in endpoint fifo

PRJI posted on 26 Jan 2012 06:09 AM PST
Cypress Employee
333 Forum Posts

 

Hi,

                Yes, all flags will work in manual mode. Go through 9.2.4 FIFO Flag Pins (FLAGA, FLAGB, FLAGC, FLAGD) section of TRM and double check your flag configuration.



Re: reg manual mode in endpoint fifo

poorni posted on 03 Feb 2012 01:47 PM PST
Member
5 Forum Posts

 Thanks for the reply. The PF and empty flag trips but not the full flag. But thats not my concern now. What would be additional registers that needed to be set up for manual mode to work? I hve the epxconfigs, ifconfig,epxfifocfg,revctl, epxfifopfh&l,inpktend, fiforesets all set to appropriate values.  All i wanted is to see the sequence that i generated and sent to endpoint fifos in endpoint buffers. Cant think of anythng that could possibly go wrong because all the timings are right.



Re: reg manual mode in endpoint fifo

Gayathri posted on 06 Feb 2012 10:10 AM PST
Cypress Employee
428 Forum Posts

 Hi Poorni,

 

You can use the below sample code as reference, that configures FX2LP in Slave, Manual Mode:

 

void TD_Init( void )

{ // Called once at startup

 

  CPUCS = 0x12; // CLKSPD[1:0]=10, for 48MHz operation, output CLKOUT

 

  IFCONFIG = 0xCF; // for async? for sync?

  EP2CFG = 0xA2;     // EP2OUT, bulk, size 512, 2x buffered

  SYNCDELAY;           

  EP6CFG = 0xE2;     // EP6IN, bulk, size 512, 2x buffered

  SYNCDELAY;

  EP4CFG = 0x00;     // EP4 not valid

  SYNCDELAY;               

  EP8CFG = 0x00;     // EP8 not valid

  SYNCDELAY;

    

  FIFORESET = 0x80;  // set NAKALL bit to NAK all transfers from host

  SYNCDELAY;

  FIFORESET = 0x02;  // reset EP2 FIFO

  SYNCDELAY;

  FIFORESET = 0x06;  // reset EP6 FIFO

  SYNCDELAY;

  FIFORESET = 0x04;  // reset EP6 FIFO

  SYNCDELAY;

  FIFORESET = 0x08;  // reset EP6 FIFO

  SYNCDELAY;

  FIFORESET = 0x00;  // clear NAKALL bit to resume normal operation

  SYNCDELAY;

 

  EP2FIFOCFG = 0x00; //manual mode, 8 bit mode

  SYNCDELAY;

  EP6FIFOCFG = 0x00; //manual mode, 8 bit mode.

  SYNCDELAY; 

  

  OUTPKTEND =0x82;   //arming the EP2 OUT endpoint twice, as it's double buffered.

  SYNCDELAY;

  OUTPKTEND = 0x82;

  SYNCDELAY; 

 

  SYNCDELAY;

  PINFLAGSAB = 0xE0; // FLAGA - indexed, FLAGB - EP6FF

  SYNCDELAY;

  PINFLAGSCD = 0x08; // FLAGC - EP2EF, FLAGD - indexed

  SYNCDELAY; 

 

}

 

Regards,

Gayathri



Re: reg manual mode in endpoint fifo

poorni posted on 06 Feb 2012 04:26 PM PST
Member
5 Forum Posts

 Thanks Gayathri..That was helpful...I am using only IN direction for no. If I have to skip a packet what really happens?  Say I have data flow continously.. Putting the skip bit to one I should skip 512 bytes (in my case) of the data right? and see the remaining data on the endpoint buffer?



Re: reg manual mode in endpoint fifo

poorni posted on 06 Feb 2012 05:05 PM PST
Member
5 Forum Posts

 Hi again,

Question is about figure 5 endpoint configuration. I was trying IN EP4 and got it to work with e613 set to E0 . That means its quad buffered selection... But EP4 and EP8 only work as double buffer.. How did this config work then? I was trying the same with EP2 and it would not work. In fig 5 if I m using option 1 say but just need EP2, do I still have to enable ep4,6,8 and use my selection pins for selecting ep2? like ifconfig 00->ep2, 01->ep4 and so on...

Summary -  Can i do an IN EP2 only with 512 double/quad buffer?



Re: reg manual mode in endpoint fifo

Gayathri posted on 08 Feb 2012 10:23 PM PST
Cypress Employee
428 Forum Posts

 Hi Poorni,

 

Regarding Skipping of an IN packet: You were right. By writing to the INPKTEND register, with the endpoint number and skip bet set to 1, will skip the packet from the IN endpoint. If the packet size is set as 512, it will skip one packet (512 Bytes sized).

 

Now in your next response, I did not get which is the figure that you were referring to. Please clarify.

I think, you got confused with EP4CFG and EP2CFG. In EP4CFG, EP4CFG[0:3] are by default zero, and cannot be modified. They are read only bits, since EP4 will always be double buffered. EP4CFG[0:1] does not represent the buffering, like in EP2CFG and EP6CFG.

Also I did not clearly understand the remaing part of your question as well.

 

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