Bedienungsanleitung Cypress AN6077

23 Seiten 0.23 mb
Download

Zur Seite of 23

Summary
  • Cypress AN6077 - page 1

    February 19, 2008 Document No. 001-15342 Rev . ** 1 with FX2LP Implementing an 8-Bit Asynchronous Interface Application Note Abstract This application note discusses how to configure the General Programmable Interface (GPIF) and slave FIFOs of the EZ-USB FX2LP™ to implement an 8-bit asynchronous interface. The GPIF is a prog ramma ble 8 or 1 6-bi ...

  • Cypress AN6077 - page 2

    February 19, 2008 Document No. 001-15342 Rev . ** 2 AN6077 GPIF Master Pin Descriptions The GPIF pin names, descriptions, an d their uses are dis- cussed in this section. RDYn Input s RDY[5:0] are ‘ready’ inputs that can be sampled and allow a transaction to wait (inserting wa it states), continue, or repeat until the signal is at the appr opri ...

  • Cypress AN6077 - page 3

    February 19, 2008 Document No. 001-15342 Rev . ** 3 AN6077 Figure 2 shows the GPIF De signer view of the FIFO Read waveform. FIFOWR When creating the F IFOWR waveform the following timin g parameters must be met. tWR pwl - SL WR Pulse Wid th LO W = 50 ns (minimum) tWR pwh - SL WR Pulse Width HIGH = 50 ns (minimum) tSFD - SL WR to FIFO DA T A Setup ...

  • Cypress AN6077 - page 4

    February 19, 2008 Document No. 001-15342 Rev . ** 4 AN6077 Figure 4. FIFO Read Waveform in gpif.c Figure 5. FIFO Write W avefo rm in gpif.c 8051 Firmware Programming (Master) This section describes how to config ure the 8051 to support the interface on the master side (registe r se ttings and others) and discusses the firmware implemented to perfor ...

  • Cypress AN6077 - page 5

    February 19, 2008 Document No. 001-15342 Rev . ** 5 AN6077 The firmware uses the AUTO mode for both IN and OUT transfers. Th is means that the maximum size (512 bytes) packets are committed automat ical ly from the pe ripheral domain to the USB domai n for OUT transfers. For IN trans- fers, they are committed from USB to the peripheral doma in. The ...

  • Cypress AN6077 - page 6

    February 19, 2008 Document No. 001-15342 Rev . ** 6 AN6077 IOA = 0x80; xFIFOTC_OUT = ( ( EP2FIFOBCH << 8 ) + EP2FIFOBCL ); // setup GPIF transaction count SYNCDELAY; EP2GPIFTCH = EP2FIFOBCH; SYNCDELAY; EP2GPIFTCL = EP2FIFOBCL; // trigger FIFO write transaction(s) SYNCDELAY; GPIFTRIG = GPIFTRIGWR | GP IF_EP2; // once master (GPIF) drains OUT p ...

  • Cypress AN6077 - page 7

    February 19, 2008 Document No. 001-15342 Rev . ** 7 AN6077 if( EP68FIFOFLGS & 0x01 ) { // EP6FF=1, when fifo "full" } else { // EP6FF=0, when fifo "not full", fo r example, buffer available // setup GPIF transaction count SYNCDELAY; EP6GPIFTCH = 0x02; SYNCDELAY; EP6GPIFTCL = 0x00; // trigger FIFO read transaction(s), using S ...

  • Cypress AN6077 - page 8

    February 19, 2008 Document No. 001-15342 Rev . ** 8 AN6077 Code Listing for Master Side #pragma NOIV // D o not generate interrupt vectors #include "fx2.h" #include "fx2regs.h" #include "fx2sdly.h" // S YNCDELAY macro extern BOOL GotSUD; // R eceived setup data flag extern BOOL Sleep; extern BOOL Rwuen; extern BOOL Sel ...

  • Cypress AN6077 - page 9

    February 19, 2008 Document No. 001-15342 Rev . ** 9 AN6077 // EP4 and EP8 are not used in thi s implementation SYNCDELAY; // EP4CFG = 0x20; // c lear valid bit SYNCDELAY; // EP8CFG = 0x60; // c lear valid bit SYNCDELAY; // FIFORESET = 0x80; // a ctivate NAK-ALL to avoid race co nditions SYNCDELAY; // FIFORESET = 0x82; // r eset, FIFO 2 SYNCDELAY; / ...

  • Cypress AN6077 - page 10

    February 19, 2008 Document No. 001-15342 Rev . ** 10 AN6077 } #define GPIFTRIGWR 0 #define GPIFTRIGRD 4 #define GPIF_EP2 0 #define GPIF_EP4 1 #define GPIF_EP6 2 #define GPIF_EP8 3 void TD_Poll( void ) { // Called repeatedly while the dev ice is idle static WORD xFIFOTC_OUT = 0x0000; static WORD xFIFOTC_IN = 0x0000; // Registers which require a sync ...

  • Cypress AN6077 - page 11

    February 19, 2008 Document No. 001-15342 Rev . ** 1 1 AN6077 // setup GPIF transaction count SYNCDELAY; EP2GPIFTCH = EP2FIFOBCH; SYNCDELAY; EP2GPIFTCL = EP2FIFOBCL; // trigger FIFO write tran saction(s), using SFR SYNCDELAY; GPIFTRIG = GPIFTRIGWR | GP IF_EP2; // once master (GPIF) drai ns OUT packet, it (re)arms to us b domain // this path is alway ...

  • Cypress AN6077 - page 12

    February 19, 2008 Document No. 001-15342 Rev . ** 12 AN6077 // RDY0=1, when peripheral i s "not empty" // drive FIFOADDR lines OEA = 0xC0; IOA = 0x00; if( EP68FIFOFLGS & 0x01 ) { // EP6FF=1, when fifo "ful l" } else { // EP6FF=0, when fifo "not full", for example, buffer avai lable // setup GPIF transaction count S ...

  • Cypress AN6077 - page 13

    February 19, 2008 Document No. 001-15342 Rev . ** 13 AN6077 } BOOL TD_Suspend( void ) { // Called before the device goes i nto suspend mode return( TRUE ); } BOOL TD_Resume( void ) { // Called after the device resumes return( TRUE ); } //---------------------------------- -------------------------------- ----------- // Device Request hooks // The f ...

  • Cypress AN6077 - page 14

    February 19, 2008 Document No. 001-15342 Rev . ** 14 AN6077 { // Called when a Set Interface com mand is received EP0BUF[ 0 ] = AlternateSetting; EP0BCH = 0; EP0BCL = 1; return( TRUE ); // Handled by user code } BOOL DR_GetStatus( void ) { return( TRUE ); } BOOL DR_ClearFeature( void ) { return( TRUE ); } BOOL DR_SetFeature( void ) { return( TRUE ) ...

  • Cypress AN6077 - page 15

    February 19, 2008 Document No. 001-15342 Rev . ** 15 AN6077 EZUSB_IRQ_CLEAR( ); USBIRQ = bmURES; // Clear U RES IRQ } void ISR_Susp( void ) interrupt 0 { Sleep = TRUE; EZUSB_IRQ_CLEAR( ); USBIRQ = bmSUSP; } void ISR_Highspeed( void ) interrupt 0 { if ( EZUSB_HIGHSPEED( ) ) { pConfigDscr = pHighSpeedConfig Dscr; pOtherConfigDscr = pFullSpeedC onfigD ...

  • Cypress AN6077 - page 16

    February 19, 2008 Document No. 001-15342 Rev . ** 16 AN6077 } void ISR_Ep1pingnak( void ) interrup t 0 { } void ISR_Ep2pingnak( void ) interrup t 0 { } void ISR_Ep4pingnak( void ) interrup t 0 { } void ISR_Ep6pingnak( void ) interrup t 0 { } void ISR_Ep8pingnak( void ) interrup t 0 { } void ISR_Errorlimit( void ) interrup t 0 { } void ISR_Ep2piderr ...

  • Cypress AN6077 - page 17

    February 19, 2008 Document No. 001-15342 Rev . ** 17 AN6077 } void ISR_Ep8fflag( void ) interrupt 0 { } void ISR_GpifComplete( void ) interr upt 0 { } void ISR_GpifWaveform( void ) interr upt 0 { // FIFORd WF detected peripheral prematurely empty (less than max . pkt. size) GPIFABORT = 0xFF; // a bort to handle shortpkt INPKTEND = 0x06; SYNCDELAY; ...

  • Cypress AN6077 - page 18

    February 19, 2008 Document No. 001-15342 Rev . ** 18 AN6077 // PINFLAGSxx EPxFIFOIRQ // EPxFIFOIE GPIFIRQ // GPIFIE GPIFADRH:L // UDMACRCH:L EPxGPIFTRIG // GPIFTRIG SYNCDELAY; FIFORESET = 0x80; // a ctivate NAK-ALL to avoid race co nditions SYNCDELAY; // s ee TRM section 15.14 FIFORESET = 0x82; // r eset, FIFO 2 SYNCDELAY; // FIFORESET = 0x84; // r ...

  • Cypress AN6077 - page 19

    February 19, 2008 Document No. 001-15342 Rev . ** 19 AN6077 EP2FIFOCFG = 0x10; // A UTOOUT=1, WORDWIDE=0 SYNCDELAY; EP6FIFOCFG = 0x0C; // A UTOIN=1, ZEROLENIN=1, WORDWIDE=0 SYNCDELAY; } void TD_Poll( void ) { // Called repeatedly while the dev ice is idle // nothing to do;slave fifo's are in AUTO mode } BOOL TD_Suspend( void ) { // Called befo ...

  • Cypress AN6077 - page 20

    February 19, 2008 Document No. 001-15342 Rev . ** 20 AN6077 EP0BUF[ 0 ] = Configuration; EP0BCH = 0; EP0BCL = 1; return(TRUE); // Handled by user code } BOOL DR_SetInterface( void ) { // Called when a Set Interface com mand is received AlternateSetting = SETUPDAT[ 2 ]; return( TRUE ); // Handled by user code } BOOL DR_GetInterface( void ) { // Call ...

  • Cypress AN6077 - page 21

    February 19, 2008 Document No. 001-15342 Rev . ** 21 AN6077 USBIRQ = bmSOF; // Clear S OF IRQ } void ISR_Ures( void ) interrupt 0 { if ( EZUSB_HIGHSPEED( ) ) { pConfigDscr = pHighSpeedConfig Dscr; pOtherConfigDscr = pFullSpeedC onfigDscr; } else { pConfigDscr = pFullSpeedConfig Dscr; pOtherConfigDscr = pHighSpeedC onfigDscr; } EZUSB_IRQ_CLEAR( ); U ...

  • Cypress AN6077 - page 22

    February 19, 2008 Document No. 001-15342 Rev . ** 22 AN6077 } void ISR_Ep4inout( void ) interrupt 0 { } void ISR_Ep6inout( void ) interrupt 0 { } void ISR_Ep8inout( void ) interrupt 0 { } void ISR_Ibn( void ) interrupt 0 { } void ISR_Ep0pingnak( void ) interrup t 0 { } void ISR_Ep1pingnak( void ) interrup t 0 { } void ISR_Ep2pingnak( void ) interru ...

  • Cypress AN6077 - page 23

    AN6077 Cypress Semico nd uctor 198 Champi on Cou rt San Jose, CA 9513 4-1709 Phone: 408- 943-2600 Fax: 408-94 3-4730 http://www.cypr ess.com © Cypress S emiconducto r Corpora tion, 200 6-2008. The informati on contained herein is subject to chang e without notice. Cy press Semiconducto r Corporation a ssumes no resp onsibility for t he use of an y ...

Produzent Cypress Kategorie Network Card

Dokumente, die wir vom Produzenten des Geräts Cypress AN6077 erhalten, können wir in mehrere Gruppen teilen. Unteranderem in:
- technische Zeichnungen Cypress
- Bedienungsanleitungen AN6077
- Produktkarten Cypress
- Informationsbroschüren
- oder Energieetiketten Cypress AN6077
Jede von ihnen ist wichtig, jedoch finden wir die wichtigsten Informationen für den Nutzer des Geräts in der Bedienungsanleitung Cypress AN6077.

Die Dokumentengruppe, die als Bedienungsanleitungen bezeichnet wird, wird ebenfalls in detaillierte Arten geteilt, solche wie: Montageanleitungen Cypress AN6077, Wartungsanleitungen, Kurzanleitungen oder Benutzeranleitungen Cypress AN6077. Abhängig vom Bedarf, sollten Sie das Dokument finden, das Sie brauchen. In unserem Service können Sie sich die populärste Bedienungsanleitung des Produkts Cypress AN6077 ansehen.

Ähnliche Bedienungsanleitungen

Die komplette Bedienungsanleitung des Geräts Cypress AN6077, wie sollte sie aussehen?
Die Bedienungsanleitung, auch bezeichnet als Benutzerhandbuch, oder einfach nur „Anleitung”, ist ein technisches Dokument, das dem Benutzer bei der Nutzung von Cypress AN6077 hilfreich sein soll. Die Bedienungsanleitungen werden in der Regel von technischen Schriftstellern geschrieben, aber in einer Sprache, die für alle Nutzer von Cypress AN6077 verständlich ist.

Eine gänzliche Bedienungsanleitung von Cypress sollte einige Grundelemente enthalten. Ein Teil von ihnen ist nicht so wichtig, wie z.B.: die Titelseite oder Autorenseiten. Die restlichen von ihnen jedoch, sollten Informationen liefern, die für den Nutzer von enormer Wichtigkeit sind.

1. Einführung und Hinweise, wie man sich in einer Bedienungsanleitung von Cypress AN6077 bewegt - Am Anfang jeder Bedienungsanleitung sollten wir Hinweise bezüglich der Nutzungsart eines bestimmten Ratgebers finden. In ihr sollten sich Informationen über die Lokalisierung des Inhaltsverzeichnisses von Cypress AN6077 befinden, FAQ oder über oft auftretende Probleme – also Stellen, die von den Benutzern in jeder Bedienungsanleitung am meisten gesucht werden
2. Inhaltsverzeichnis - Index aller Ratschläge bezüglich Cypress AN6077, die wir im aktuellen Dokument finden
3. Ratschläge zur Nutzung der Grundfunktionen des Geräts Cypress AN6077 - die uns die ersten Schritte während der Nutzung von Cypress AN6077 erleichtern sollten
4. Troubleshooting - geordneter Tätigkeitslauf, der uns bei der Diagnose und als nächstes bei der Lösung wichtiger Probleme mit Cypress AN6077 hilft
5. FAQ - häufig gestellte Fragen
6. Kontaktdaten Informationen darüber, wo man Kontakt zum Produzenten / Service von Cypress AN6077 im bestimmten Land suchen kann, wenn es nicht gelingt, das Problem selbst zu lösen.

Haben Sie eine Frage bezüglich Cypress AN6077?

Nutzen Sie das untere Formular

Wenn Sie mit Hilfe der gefundenen Bedienungsanleitung Ihr Problem mit Cypress AN6077 nicht gelöst haben, stellen Sie eine Frage, indem Sie das untere Formular nutzen. Wenn einer der Nutzer ein ähnliches Problem mit Cypress AN6077 hatte, ist es möglich, dass er mit Ihnen die Lösung teilen möchte.

Text vom Bild übertragen

Kommentare (0)