Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > FLAG doesn't work by the Slave-Fifo mode.

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



FLAG doesn't work by the Slave-Fifo mode.
Moderator:
RSKV

Post Reply
Follow this topic



FLAG doesn't work by the Slave-Fifo mode.

rion posted on 20 Dec 2011 3:12 AM PST
Member
2 Forum Posts
Hello, I try to use EZ-USB in Slave-Fifo. They are EP6-IN and EP2-out. I could confirm that FLAGA works by the output of EP2. However, FLAGC doesn't move in input to EP6. Could you give me some advice? I tried following initialization. void TD_Init(void) // Called once at startup { CPUCS = 0x12; // CPU Control and Status Register SYNCDELAY; IFCONFIG = 0xE3; // Interface Configuration SYNCDELAY; //EP1 outout Config EP1OUTCFG = 0xB0; SYNCDELAY; //EP1 Inout Config EP1INCFG = 0xB0; SYNCDELAY; //Slave EPs setup EP2CFG = 0xA2; SYNCDELAY; EP6CFG = 0xE2; SYNCDELAY; EP4CFG = 0x02; SYNCDELAY; EP8CFG = 0x02; SYNCDELAY; FIFORESET = 0x80; SYNCDELAY; FIFORESET = 0x82; SYNCDELAY; FIFORESET = 0x84; SYNCDELAY; FIFORESET = 0x86; SYNCDELAY; FIFORESET = 0x88; SYNCDELAY; FIFORESET = 0x00; SYNCDELAY; PINFLAGSAB = 0xE8; // b7:FLAGB[3]=1 [1110]=EP6FF // b6:FLAGB[2]=1 // b5:FLAGB[1]=1 // b4:FLAGB[0]=0 // b3:FLAGA[3]=1 [1000]=EP2EF // b2:FLAGA[2]=0 // b1:FLAGA[1]=0 // b0:FLAGA[0]=0 SYNCDELAY; PINFLAGSCD = 0x9A; // b7:FLAGD[3]=1 [1001]=EP4EF // b6:FLAGD[2]=0 // b5:FLAGD[1]=0 // b4:FLAGD[0]=1 // b3:FLAGC[3]=1 [1010]=EP6EF // b2:FLAGC[2]=0 // b1:FLAGC[1]=1 // b0:FLAGC[0]=0 SYNCDELAY; FIFOPINPOLAR = 0x00; // Slave FIFO Interface Pins Polarity Register // b7:0 // b6:0 // b5:PKTEND=0 0=active low 1=active high // b4:SLOE=0 0=active low 1=active high // b3:SLRD=0 0=active low 1=active high // b2:SLWR=0 0=active low 1=active high // b1:EF=0 0=active low 1=active high // b0:FF=0 0=active low 1=active highS SYNCDELAY; EP2FIFOCFG = 0x10; // b7:0 // b6:INFM1=0 IN Full Minus One // b5:OEP1=0 OUT Empty Plus One // b4:AUTOOUT=1 Instantaneous Connection to Endpoint FIFO // b3:AUTOIN=0 Auto Commit to SIE. This bit applies only to IN endpoints // b2:ZEROLENIN=0 Enable Zero length IN Packets // b1:0 // b0:WORDWIDE=0 Select Byte/Word FIFOs on PORTB/D Pins SYNCDELAY; EP6FIFOCFG = 0x0C; // AUTOIN=1, ZEROLENIN=1, WORDWIDE=0 // b7:0 // b6:INFM1=0 IN Full Minus One // b5:OEP1=0 OUT Empty Plus One // b4:AUTOOUT=0 Instantaneous Connection to Endpoint FIFO // b3:AUTOIN=1 Auto Commit to SIE. This bit applies only to IN endpoints // b2:ZEROLENIN=1 Enable Zero length IN Packets // b1:0 // b0:WORDWIDE=0 Select Byte/Word FIFOs on PORTB/D Pins SYNCDELAY; OUTPKTEND = 0x82; SYNCDELAY; OUTPKTEND = 0x82; SYNCDELAY; OUTPKTEND = 0x82; SYNCDELAY; OUTPKTEND = 0x82; SYNCDELAY; EA = 1; SYNCDELAY; REVCTL = 0x03; SYNCDELAY; // Port A Initialize PORTACFG = 0x40; SYNCDELAY; OEC = 0xff; SYNCDELAY; IOC = 0x00; SYNCDELAY; OED = 0x00; SYNCDELAY; IOD = 0x00; SYNCDELAY; PORTECFG = 0x00; SYNCDELAY; OEE = 0xf0; SYNCDELAY; IOE = 0xff; SYNCDELAY; PORTE = 0x00; SYNCDELAY; }


Re: FLAG doesn't work by the Slave-Fifo mode.

rion posted on 20 Dec 2011 03:24 AM PST
Member
2 Forum Posts
Hi, This is rion. I'm sorry, The line feed collapsed. Hello, I try to use EZ-USB in Slave-Fifo. They are EP6-IN and EP2-out. I could confirm that FLAGA works by the output of EP2. However, FLAGC doesn't move in input to EP6. Could you give me some advice? I tried following initialization.

Re: FLAG doesn't work by the Slave-Fifo mode.

PRJI posted on 21 Dec 2011 05:41 AM PST
Cypress Employee
333 Forum Posts

  Hi,

      The FIFO configuration that you have used is an invalid configuration so please look into section 1.17 EZ-USB Endpoint Buffers -page 30 of TRM for valid fifo configurations. Do REVCTL initialization in the begning of TD_Init. Please let me know why you used OUTPKTEND four time.

Thanks 

Prajith

 






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