Cypress CY3684, CY3674 User Manual

CY3674/CY3684

EZ-USB® Development Kit User Guide

Doc. # 001-66390 Rev. *D
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone (Intnl): 408.943.2600
www.cypress.com
Copyrights
Copyrights
© Cypress Semiconductor Corporation, 2011-2013. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsib ility for the use of any circu itry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control o r safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom soft­ware and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as speci­fied in the applicable agreement. Any reproduction, modification, transla tion, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATE­RIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the applica tion or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems whe re a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support sys­tems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement. All trademarks or registered trademarks referenced herein are property of the respective corporations.
2 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

Contents

1. Introduction 7
1.1 Introduction..................................................................................................................7
1.2 Kit Contents........ ... ... ... ... ....................................... ... .... ...................................... .... ... ..7
1.3 Document Revision History ........................................................................................8
1.4 Documentation Conventions .......................................................................................8
2. Getting Started 9
2.1 Kit Installation .............................................................................................................9
2.2 Install Hardware.........................................................................................................17
3. Advanced Development Board 19
3.1 Introduction................................................................................................................19
3.2 Schematic Summary........... ... ... ... .... ... ... ... .... ... ... ... ... ....................................... ... .... ...19
3.3 Jumpers.....................................................................................................................20
3.4 EEPROM Select and Enable Switches SW1 and SW2.............................................20
3.5 Interface Connectors .................................................................................................22
3.6 ATA Connector P8.....................................................................................................25
3.7 U2 - 22v10 Gate Array Logic (GAL)...........................................................................25
3.8 Memory Maps..................................... ... ... .... ... ... ....................................... ... ... ... .... ...26
3.9 I2C Expanders...........................................................................................................27
3.10 Indicators – Power and Breakpoint............................................................................27
3.11 General-Purpose Indicators.......................................................................................28
1.2.1 Hardware..........................................................................................................7
1.2.2 Software on CD-ROM......................................................................................7
1.2.3 Required Tools Not Included............................................................................8
1.2.4 Other Suggested Tools.....................................................................................8
4. Development Kit Contents 29
4.1 Bin..............................................................................................................................29
4.2 Documentation...........................................................................................................30
4.3 Drivers .......................................................................................................................30
4.4 Firmware....................................................................................................................31
4.5 GPIF_Designer..........................................................................................................32
4.6 Hardware...................................................................................................................32
4.7 SuiteUSB...................................................................................................................32
4.8 Target ........................................................................................................................33
4.9 Utilities .......................................................................................................................33
4.10 uV2_4k.......................................................................................................................33
5. EZ-USB Firmware Frameworks 35
5.1 Frameworks Overview...............................................................................................35
5.2 Building FrameWorks ................................................... ... ... ... .... ................................37
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 3
Contents
5.3 Function Hooks..........................................................................................................38
5.3.1 Task Dispatcher Functions... ... ... .... ...................................... .... ... ... ... ... .... ... ...38
5.3.1.1 TD_Init()...........................................................................................38
5.3.1.2 TD_Poll() .........................................................................................38
5.3.1.3 TD_Suspend().................................................................................38
5.3.1.4 TD_Resume()..................................................................................38
5.3.2 Device Request Functions.............................................................................38
5.3.2.1 DR_GetDescriptor().........................................................................38
5.3.2.2 DR_GetInterface()...........................................................................39
5.3.2.3 DR_SetInterface()............................................................................39
5.3.2.4 DR_GetConfiguration()....................................................................39
5.3.2.5 DR_SetConfiguration()....................................................................39
5.3.2.6 DR_GetStatus()...............................................................................39
5.3.2.7 DR_ClearFeature()..........................................................................39
5.3.2.8 DR_SetFeature().............................................................................39
5.3.2.9 DR_VendorCmnd()..........................................................................40
5.3.3 ISR Functions ................................................................................................40
5.3.3.1 ISR_Sudav()....................................................................................40
5.3.3.2 ISR_Sof().........................................................................................40
5.3.3.3 ISR_Ures().......................................................................................40
5.3.3.4 ISR_Susp()......................................................................................40
5.3.3.5 ISR_Highspeed().............................................................................40
5.4 EZ-USB Library .........................................................................................................41
5.4.1 Building the Library........................... ... ... .... ... ... ....................................... ... ...41
5.4.2 Library Functions ...........................................................................................41
5.4.2.1 EZUSB_Delay()...............................................................................41
5.4.2.2 EZUSB_Discon().............................................................................41
5.4.2.3 EZUSB_GetStringDscr()..................................................................41
5.4.2.4 EZUSB_Susp()................................................................................42
5.4.2.5 EZUSB_Resume()...........................................................................42
5.4.2.6 I2C Routines....................................................................................42
6. Cypress USB Drivers for EZ-USB Kits 43
6.1 Cypress USB Signed Driver Package for EZ-USB Devices......................................43
6.2 Drivers for Firmware Examples and Default EZ-USB Configuration.........................44
6.2.1 Binding Cypress USB Driver to EZ-USB Development Board.......................45
6.3 Drivers for Firmware and Keil Monitor Automatic Download using Script Files.........47
6.3.1 How to Generate and Play Script Files (.spt).................................................47
6.3.1.1 Script File Generation using the Cyscript Tool ................................47
6.3.1.2 Script File Generation and Play using CyConsole...........................48
6.3.1.3 Script Generation and Play using CyControlCenter ........................49
6.3.2 Firmware Download using CyLoad Driver Package ......................................49
6.3.2.1 How to Test CyLoad Driver Package ..............................................52
6.3.3 Keil Debug Monitor Download using Script and CyMonfx1_fx2lp Driver Pack­age53
6.4 SuiteUSB Driver Packages........................................................................................53
7. USB PC Host Utilities and SuiteUSB Applications 55
7.1 USB Applications in EZ-USB Development Kit ........................................................55
7.2 SuiteUSB Applications...............................................................................................55
7.2.1 Cyconsole Utility ............................................................................................56
7.2.2 CyControlCenter Utility .................................................................. ... ... .... ......59
4 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Contents
7.2.3 Streamer Utility...............................................................................................60
7.2.4 Cydesc Utility ............................................................. .... ... ... ... .......................62
7.2.5 FxEEPROM Utility..........................................................................................63
8. EZ-USB Development Kit Firmware Examples 65
8.1 Method to Verify the Firmware Example Functionality ..............................................66
8.2 hid_kb Firmware Example .........................................................................................66
8.2.1 Building Firmware Example Code for EZ-USB Internal RAM and External EE­PROM.67
8.2.2 Method to Download Firmware Image to EZ-USB Internal RAM Memory.....69
8.2.3 Method to Download Firmware Image to External I2C EEPROM..................69
8.2.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............70
8.2.5 Testing the hid_kb Firmware Example Functionality......................................70
8.3 IBN Firmware Example..............................................................................................71
8.3.1 Description.....................................................................................................71
8.3.2 Building Firmware Example Code for EZ-USB RAM and EEPROM..............73
8.3.3 Method to Download Firmware Image to EZ-USB Internal RAM and External EEPROM73
8.3.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............73
8.3.5 Testing the IBN Firmware Functionality..........................................................73
8.4 Pingnak Firmware Example.......................................................................................74
8.4.1 Description.....................................................................................................74
8.4.2 Building Firmware Example Code for EZ-USB RAM and EEPROM..............76
8.4.3 Method to Download Firmware Image to EZ-USB Internal RAM and External EEPROM76
8.4.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............76
8.4.5 Testing the pingnak Firmware Functionality...................................................76
8.5 Bulkloop Example......................................................................................................77
8.5.1 Description.....................................................................................................77
8.5.2 Building Bulkloop Firmware Example Code for EZ-USB RAM and EEPROM... 79
8.5.3 Method to Download Bulkloop Firmware Image to Internal RAM or EEPROM.. 79
8.5.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............80
8.5.5 Testing the Bulkloop Firmware Functionality..................................................80
8.5.5.1 Test using Cyconsole PC Application.................... ... ... .... ... ... ... .... ...80
8.5.5.2 Test using Cybulk Application..........................................................81
8.5.5.3 Testing Bulkloop Example using Bulkloop C# .NET Application...... 82
8.6 Bulksrc Firmware Example........................................................................................83
8.6.1 Description.....................................................................................................83
8.6.2 Building Bulksrc Firmware Example Code for EZ-USB RAM Memory and EE­PROM85
8.6.3 Method to Download Bulksrc Firmware Image to EZ-USB Internal RAM and EEPROM85
8.6.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............85
8.6.5 Testing the Bulksrc Firmware Functionality....................................................85
8.7 Bulkext Firwmare Example........................................................................................86
8.7.1 Description.....................................................................................................86
8.7.2 Building Bulkext fIrmware Example Code for EZ-USB RAM Memory and EE­PROM87
8.7.3 Method to Download Firmware Image to EZ-USB Internal RAM and EEPROM 87
8.7.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............88
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 5
Contents
8.7.5 Testing the Bulkext Firmware Functionality....................................................88
8.8 EP_Interrupts Example..............................................................................................88
8.8.1 Description.....................................................................................................88
8.8.2 Building EP_Interrupts Firmware Example Code for EZ-USB RAM and EE­PROM88
8.8.3 Method to Program EP_Interrupts Firmware Image to EZ-USB Internal RAM and EEPROM88
8.8.4 Binding Cypress USB Driver for the Downloaded Firmware Image...............88
8.8.5 Testing the EP_Interrupts Firmware Functionality .........................................89
8.9 iMemtest Firmware Example.....................................................................................89
8.10 LEDcycle Firmware Example .......................................................... .... ... ... ... ... .... ... ...89
8.11 Dev_IO Firmware Example .......................................................................................89
8.12 extr_intr Firmware Example.......................................................................................90
8.12.1 Testing the Example ......................................................................................91
8.13 Vend_ax Example .................................................................. ... ... ... .... ... ... ... ... ..........91
8.13.1 Testing the vend_ax Example........................................................................92
8.14 Debugging Using Keil Monitor Program....................................................................97
9. Resources 105
9.1 Hardware Resources...............................................................................................105
9.2 Reference Designs................................................. ... ... ... ....................................... .105
9.2.1 CY4611B - USB 2.0 to ATA Reference Design............................................105
9.2.2 CY4651 v1.3 - Cypress and AuthenTe c Reference Design for Biometric Secu­rity in External USB Hard Disk Drives106
9.2.3 CY3686 NX2LP-FLEX USB 2.0-to-NAND Reference Design Kit ................106
9.3 Application Notes.....................................................................................................106
A. Appendix 111
A.1 U2 (GAL) code (file is 'FX2LP.ABL')........................................................................111
A.2 Board Layout................... ... ... ... ....................................... ... .... .................................113
A.3 Schematic................................................................................................................114
A.4 Frequently Asked Questions ...................................................................................115
6 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

1. Introduction

1.1 Introduction

The EZ-USB® Development Kit (DVK) is a good starting point for developing an EZ-USB based product. The DVK includes everything you will need to get started: a development board, example firmware, a Microsoft-certified signed generic USB device driver (cyusb.sys), documentation, and assorted tools. This section provides an overview of the DVK. The software installation of the kit includes additional help files and documentation more specific to the various components in the kit. The DVK is designed to work with the EZ-USB FX2LP and FX1 chips. FX1 is a full-speed only ver­sion of FX2LP. Other than the absence of a high-speed transceiver, FX1 is identical to FX2LP. Except where distinction is required, both chips are generically referred to as EZ-USB throughout this document.

1.2 Kit Contents

The following list shows the components supplied in the EZ-USB DVK. They represent most of the development tools required to build a USB system.

1.2.1 Hardware

EZ-USB advanced development board
EZ-USB prototyping board (breadboard)
USB A-to-B cable
RS-232 cable
Software installation CD-ROM
Three samples: EZ-USB FX1 IC (CY7C64713-128AXC) for the CY3674 kit and EZ-USB FX2LP
IC (CY7C68013A-128AXC) for the CY3684 kit.
Quick start guide bookle t

1.2.2 Software on CD-ROM

EZ-USB firmware library and firmware frameworks
Firmware sample code
Microsoft-certifie d signed Cypress generic USB driver (3.4.5.000) for Windows XP, Vista, and 7
OS platforms.
Cypress USB class library (CyApi)
Cypress USB console
SuiteUSB 3.4.7 Development tools for Visual Studio
Cypress GPIF Designer
Cypress firmware and Keil monitor download driver sample
EZ-USB documentation and help files
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 7
Introduction
Reference schematics and PCB design and layout files.
Limited evaluation version of the Keil 8051 development tools (Compiler, Assembler, IDE,
Debugger)

1.2.3 Required Tools Not Included

Full retail Keil Development System (Keil uVision2)
Microsoft Visual C++ and C# (all PC sample codes are developed on this platform).
USB-capable PC running Windows 2000, XP, Vista, or 7.

1.2.4 Other Suggested Tools

CATC USB Protocol Analyzer.

1.3 Document Revision History

Table 1-1. Revision History
PDF
Revision
** 02/07/2011 ROSM Initial version of user guide *A 05/09/2011 NMMA Update to section 2.2 Schematic Summary *B 06/06/2012 NMMA The document has to be updated with the OOB review comments.
*C 06/29/2012 NMMA *D 09/27/2013 DBIR Removed Section 7.2.4, Bulkloop Application.
Creation
Date
Origin
of
Change
Minor text edits. Updated correct path “Start->All programs->Cypress­>Cypress Suite USB 3.4.7-->CyConsole” in the document.
Description of Change

1.4 Documentation Conventions

Table 1-2. Document Conventions for Guides
Convention Usage
Courier New
Italics
[Bracketed, Bold]
File > Open
Bold
Times New Roman
Text in gray boxes Describes Cautions or unique functionality of the product.
Displays file locations, user entered text, and source code:
C:\ ...cd\icc\
Displays file names and reference documentation: Read about the sourcefile.hex file in the PSoC Designer User Guide.
Displays keyboard commands in procedures: [Enter] or [Ctrl] [C]
Represents menu paths: File > Open > New Project
Displays commands, menu paths, and icon names in procedures: Click the File icon and then click Open.
Displays an equation:
2 + 2 = 4
8 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

2. Getting S t arted

This chapter describes the installation of the CY3684 EZ-USB FX2LP DVK software. The process is similar for the CY3674 EZ-USB FX1 DVK.

2.1 Kit Installation

To install the kit software, follow these steps:
1. Insert the kit CD/DVD into the CD/DVD drive of your PC. The CD/DVD is designed to auto-run and the kit installer startup screen appears.
You can also download the latest kit installer ISO file for CY3684 and CY3674 Create an installer CD/DVD or extract the ISO using WinRar and install the executables.
2. Click Install CY3684 EZ-USB FX2LP DVK to start the installation, as shown in Figure 2-1. Figure 2-1. Kit Installer Startup Screen
Note For EZ-USB FX1, click on Install CY3674 EZ-USB FX1 DVK. If auto-run does not execute, double-click on the cyautorun.exe file in the root directory of the CD.
3. The InstallShield Wizard screen appears. The default location for setup is shown on the InstallShield Wizard screen. You can change the location for setup using Change, as shown in
Figure 2-2. Click Next to launch the kit installer.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 9
Getting Started
Figure 2-2. InstallShield Wizard
4. On the Product Installation Overview screen, select the installation type that best suits your requirement. The drop-down menu has three options - Typical, Complete, and Custom, as shown in Figure 2-3. In the current installer, all three installation types result in the same set of software getting installed. Select the default typical installation and click Next.
Figure 2-3. Installation Type Options
10 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Getting Started
5. When the installation begins, all packages are listed on the Installation page. A green check mark appears adjacent to every package that is downloaded and installed, as shown in Figure 2-4. Wait until all the packages are downloaded and installed successfully.
Figure 2-4. Installation Page
6. The Keil uVision2 trial version IDE triggers at this stage. If the software is already installed in the PC, then the installer will not trigger the installation. If the PC does not contain the software, then the Keil welcome screen appears, as shown in Figure 2-5. Click Next.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 11
Getting Started
Figure 2-5. Keil Welcome Screen
7. Enter the user name and company name credentials, as shown in Figure 2-6, to proceed with th e installation.
Figure 2-6. Keil User Information lnput Window
8. The Keil software proceeds with the inst allation and copies the necessary packages at the default directory C:\Keil. After completion, click on Finish, as shown in Figure 2-7.
12 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Figure 2-7. Keil User Information lnput Window
Getting Started
9. The GPIF designer software is triggered after Keil installation.This software is used to create State machine waveforms to communicate between the EZ-USB device and devices such as FPGA, image sensors, FIFO, and so on. If the software is already installed in the PC, then the installer will not trigger the installation. If the PC does not contain the software, then the GPIF Designer welcome screen appears, as shown in Figure 2-8. Click Next.
Figure 2-8. GPIF Designer Welcome Window
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 13
Getting Started
10. Click Next in the subsequent windows and the Finish window appears, as shown in Figure 2-9. Figure 2-9. GPIF Designer Welcome Window
11. The SuiteUSB 3.4.7 package install shield is triggered after the GPIF designer software installa­tion. If the software is already installed in the PC, then the installer will not trigger the installation. If the PC does not contain the software, then the SuiteUSB welcome screen app ears , as sho wn in Figure 2-10. Click Next and accept the Cypress Software license agreement, as shown in
Figure 2-11.
Figure 2-10. SuiteUSB Welcome Window
14 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Figure 2-11. SuiteUSB License Agreement Window
Getting Started
12.Enter the user credentials in the SuiteUSB window, as shown in Figure 2-12. Click Next. The default directory of the SuiteUSB is C:\Cypress\Cypress Suite USB 3.4.7. The default directory can be changed at this stage. Click Next after selecting the directory. Click the Install button in the subsequent window. The SuiteUSB package installation progress is shown in the next window. Finally the SuiteUSB Finish window appears. Click Finish button to complete the installation process of SuiteUSB.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 15
Getting Started
Figure 2-12. SuiteUSB User Login Window
13.The CY3684 EZ-USB FX2LP development Kit Finish window appears after installing the kit con­tent, Keil software, GPIF Designer, and the SuiteUSB 3.4.7 package.
16 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Figure 2-13. CY3684 Finish Window
Getting Started
Note The procedure to install the CY3674 installer is similar to CY3684.

2.2 Install Hardware

No hardware installation is required for this kit.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 17
Getting Started
18 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

3. Advanced Development Board

3.1 Introduction

The EZ-USB Advanced Development Board provides a compact evaluation and design vehicle for the EZ-USB family. The board provides expansion and interface signals on six 20-pin headers. A mating prototype board allows quick construction and testing of USB designs. All ICs on the board operate at 3.3 V. The board can be powered from the USB connector.
The EZ-USB Advanced Development Board is supplied as part of the Cypress EZ-USB DVK, which includes an evaluation version of Cypress-customized software development tools from Keil Software Inc. The Keil 8051 assembler, C compiler, and debugger work with the development board to provide a complete code development environment. An 8051 debu g monitor is typically loaded into the development board expansion RAM to leave the internal RAM free for code development. The evaluation version of the Keil tools that ships with the DVK has several restrictions that make it inappropriate for real-world development. Most significantly, it limits the compiled object size to 4 KB. The full retail version allows a code of any size.

3.2 Schematic Summary

Read this description while referring to the EZ-USB FX2LP development board schematic and the FX2LP development board assembly drawing. Both drawings are located in the Schematic on
page 114 and are available in PDF format in the DVK hardware directory. With the exception of the
EZ-USB chip, the development boards in the FX2LP and FX1 DVKs are identica l an d are r efer red to generically as the EZ-USB development board in the following sections.
U1 is either EZ-USB FX2LP (CY7C68013A-128AC) or FX1 (CY7C64713-128AC). This is the full­function EZ-USB chip, which brings out the 8051 address and data buses for external memory expansion. U2, a reprogrammable GAL, provides RAM enable signals for four jumper-selectable memory maps. U3 is a 128-KB RAM, used for external 8051 memory expansion. Only 64 KB of this memory is addressed by the 8051; the A16 pin is connected to a pull-up resistor that can be attached to a GAL output to provide bank switching options.
U4 is a 3.3-V, 500-milliamp voltage regulator. U5 and U6 are socketed EEPROMS, used for EZ-USB initialization and 8051 general-purpose access. U7 converts the 3.3-V 8051 serial port signals to bipolar RS-232 levels. U8 and U10 are Philips PCF8574 I/O expanders, which attach to the EZ-USB
2
I
C bus and provide eight GPIO pins. U10 reads the four push-button switches, S2–S5, and U8
drives the 7-segment readout U9. Six 20-pin headers, P1-P6, provide interface signals to the plug-in prototyping board supplied in this
kit. They also serve as connection points for HP (Agilent) logic analyzer pods. P8 contains a subset of signals from P1–P6 on a connector that is pinned out for connection to a ‘straight-through’ ATA cable.
Two slide switches, SW1 and SW2, control the connection and selection of the two socketed EEPROMS at U5 and U6.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 19
Advanced Development Board

3.3 Jumpers

Table 3-1. EZ-USB Development Board Jumpers
Jumper Function Default Notes
JP1, JP10
JP2
JP3
JP5 3.3 V power IN (1-2)
JP6, JP7 Memory map selection OUT (1-2)
JP8 Wakeup2 pin OUT (1-2)
JP9
Connects 3.3 V power to the EZ-USB chip.
Powers the on-board 3.3 V regulator from USB Vbus pin
Connects four GAL pins to LEDS D2, D3, D4, D5
2
C bus test points
I
IN (1-2)
IN (1-2)
IN (1-2) (3-4) (5-6) (7-8)
N/A
To operate the board in self-powered mode, remove JP2 and supply 4 V to 5 V to JP2-1, and GND to a ground pin (TP1 is a convenient GND point).
U2, the on-board GAL, contains code to use the four LEDs as software indicators that can b e set . To use the GAL pins for something else, which requires re­programming the GAL or to wire the general purpose indicators D2-D5 to other parts of the board, first remove the appropriate shorting plug(s).
Supplies 3.3-V power to the board. It can be removed and replaced with ammeter probes in series to mea­sure board current.
These jumpers select one of the four memory maps for U3, the external 128 KB RAM. See Memory Maps
on page 26 for details.
Inserting a shorting plug into JP8 connects an on­board RC network (R42,C43) to the secondary remote wakeup pin WU2. This R-C network can be used to test the periodic remote wakeup firmware when this dual-purpose pin (it defaults to PA3) is pro­grammed as WU2.
2
C bus SCL and SDA lines can be monitored or
The I externally connected using JP9.

3.4 EEPROM Select and Enable Switches SW1 and SW2

SW1 selects between two socketed EEPROMs, one strapped to address 000 (U6), and the other strapped to address 001(U5).
SW2 enables or disables the EEPROM selected by SW1. The EZ-USB chip has various startup modes, which depend on the existence of an EEPROM
connected to its SCL and SDA lines. Switches SW1 and SW2 allow the EEPROMs to be disconnected from FX1/FX2LP, or to be connected using one of the two EEPROMs installed in sockets U5 and U6.
The EZ-USB chip contains two I boot load controller operates when EZ-USB comes out of reset, and the 8051 controller operates
under firmware control when the 8051 is running, allowing the 8051 to access general-purpose I devices connected to the SCL and SDA lines. The following section deals with the roles of SW1 and SW2 in accommodating the various boot load mechanisms.
The EZ-USB bootloader accommodates two EEPROM types, in “Small” and “Large” versions, as shown in Table 3-2.
20 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
2
C controllers, a “boot load” controller and an 8051 controller. The
2
C
Advanced Development Board
Table 3-2. Typical EZ-USB external EEPROMS
EEPROM Type Size A2A1A0 Typical P/N
Small 16×8 000 24LC00
128×8 000 24LC01 256×8 000 24LC02
Large 8K×8 001 24LC64/5
Small EEPROMs are typically used to supply custom VID and PID information, allowing the EZ-USB to enumerate with a driver associated with your EZ-USB design.
Large EEPROMs are typically used to boot-load code into the internal EZ-USB RAM, and then start up the 8051 to execute this internal code, which performs the enumeration.
The EZ-USB loader determines the EEPROM size by first initiating an I
2
C transfer to address
1010000 (1010 is the EEPROM-class address, and 000 is the sub-address). If the device supplies
2
an I
C acknowledge pulse, the EZ-USB loader writes a single EEPROM address byte to initialize the
internal EEPROM address pointer to zero. If this transfer does not return an ACK pulse, the EZ-USB loader initiates a second I
time to address 10100001 (1010 = EEPROM, sub-address 001). If an ACK is returned by the I
2
C transfer, this
2
device, the EZ-USB loader writes two EEPROM address bytes to initialize the internal EEPROM address pointer to 0.
C
If neither transfer returns an ACK pulse, the EZ-USB loader boots in the ‘generic’ mode. Three EZ-USB startup sequences and the associated settings for SW1 and SW2, are as follows:
Generic: SW2 = No EEPROM, SW1 = either position
When no EEPROM is connected to SCL and SDA, the EZ-USB chip enumerates using its inter­nal, “hard-wired” VID and PID values. This mode can be selected without removing any socketed EEPROMs by switching SW2 to the ‘off’ (down) position. This electrically disconnects any EEPROMs that occupy the EEPROM sockets U5 and U6. The “OFF” mode is useful to start up EZ-USB in a manner (using internal VID/PID) that binds the development system board to the Cypress debug tools, such as the Control Panel and Keil. When running, SW2 ca n be switched to the ON position to allow 8051 access, for example, to reprogram the EEPROM.
C0 Load: SW2 = EEPROM, SW1 = SMALL
A “C0” load provides EZ-USB with external Ve ndor ID (VID), Product ID (PID), and Device ID (DID) values, allowing it to enumerate with the EEPROM-supplied VID, PID, and DID. At power­on, if the EZ-USB chip detects an EEPROM with the hex value ‘C0’ as its first byte, it continues to load seven additional EEPROM bytes, which correspond to the USB VID, PID, DID, and an EZ­USB configuration byte. When EZ-USB enumerates, it uses these EEPROM values instead of the hard-wired internal values.
Because only eight bytes of data are required, a ‘small’ EEPROM is generally used for this mode; for example, the 16-byte 24LC00.
C2 Load: SW2 = EEPROM, SW1 = LARGE
A “C2” load provides a method to load the EZ-USB internal RAM with 8051 firmware before enu­meration. This boot load mechanism allows EZ-USB to enumerate as a fully custom device, because the 8051 code handles enumeration using VID/PID values embedded in the code.
At power-on, if the EZ-USB chip detects an EEPROM with the hex value ‘C2’ as its first byte, it continues to load an EZ-USB configuration byte, followed by blocks of 8051 code. The last byte loaded takes the 8051 out of reset. This mode usually requires a large EEPROM, such as the 8 KB 24LC64.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 21
Advanced Development Board
Note If an EEPROM is connected to the SCL and SDA lines, but does not contain 0xC0 or 0xC2 as its first byte, the loader reverts to the ‘generic’ case. In other words, the bootloader operates as though no EEPROM is connected. However, when the 8051 is running, it has full access to any con-
nected EEPROM because the 8051 I

3.5 Interface Connectors

Table 3-3. Logic Analyzer Pinout
Agilent 01650-63203 Pod Pins
CLK1 3 4 D15
D14 5 6 D13 D12 7 8 D11 D10 9 10 D9
D8 11 12 D7 D6 13 14 D5 D4 15 16 D3 D2 17 18 D1 D0 19 20 GND
2
C controller is completely independent of the boot load logic.
Six 20-pin headers, P1–P6, on the EZ-USB Development Board have pins assigned to be compati­ble with HP (Agilent) logic analyzers, as shown in Table 3-3.
These six headers serve three purposes:
They mate with the prototyping board supp lied in the EZ-USB DVK.
They allow direct connection of the HP (Agilent) logic analyzer pods (Agilent P/N 01650-63203).
They allow general-purpose probing by other logic analyzers or oscilloscopes.
Table 3-3 shows the logic analyzer pod pin designations. The EZ-USB signals on P1–P6 are
arranged to fulfill the following requirements:
High-speed EZ-USB strobe signals (PSEN, WR#, CLKOUT, IFCLK, and RD#) are connected to
pin 3 of each of the five connectors for P1–P6. Therefore, they are used as the logic analyzer clock, CLK1.
CLK2 is not used. Instead, each connecto r brings 3.3-V power from the EZ-USB development
board up to the prototype board using pi n 2.
The signals are logically grouped. For example, the 8051 address bus is on P5 and the EZ-USB
FIFO data, which shares PORTB and PORTD pins, is on P1.
The 20-pin headers on the prototyping board can be stacked. Therefore, it is possible to build cus­tom circuitry on the prototyping board, plug the board into the EZ-USB development board, and still plug the logic analyzer pods to the six connectors P1–P6. Table 3-4 to Table 3-9 show the EZ- USB pin designations for P1 through P6. The alternate pin names are listed in the last columns.
22 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Table 3-4. Pin Designation (P1)
Alternate Default P1 Default Alternate
NC 1 2 3.3V
PSEN# 3 4 PD7 FD[15] FD[14]PD65 6PD5FD[13] FD[12] PD4 7 8 PD3 FD[11] FD[10] PD2 9 10 PD1 FD[9]
FD[8] PD0 11 12 PB7 FD[7] FD[6] PB6 13 14 PB5 FD[5] FD[4] PB4 15 16 PB3 FD[3] FD[2] PB2 17 18 PB1 FD[1] FD[0] PB0 19 20 GND
Table 3-5. Pin Designation (P2)
Alternate Default P2 Default Alternate
NC 1 2 3.3V NC 3 4 RDY1 SLWR
SLRD RDY0 5 6 CTL5
CTL4 7 8 CTL3 FLAGC CTL2 9 10 CTL1 FLAGB FLAGA CTL0 11 12 PA7 FLAGD
PKTEND PA6 13 14 PA5 FIFOADR1
FIFOADR0 PA4 15 16 PA3 WU2
SLOE PA2 17 18 PA1 INT1#
INT0# PA0 19 20 GND
Advanced Development Board
Table 3-6. Pin Designation (P3)
Alternate Default P3 Default Alternate
NC 1 2 3.3V
WR# 3 4 RDY5 RDY4 5 6 RDY3 RDY2 7 8 BKPT
RESET# 9 10 N.C.
N.C. 11 12 PC7 GPIFADR7 GPIFADR6 PC6 13 14 PC5 GPIFADR5 GPIFADR4 PC4 15 16 PC3 GPIFADR3 GPIFADR2 PC2 17 18 PC1 GPIFADR1 GPIFADR0 PC0 19 20 GND
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 23
Advanced Development Board
Table 3-7. Pin Designation (P4)
Alternate Default P4 Default Alternate
CLKOUT 3 4 GND
Table 3-8. Pin Designation (P5)
Alternate Default P5 Default Alternate
NC 1 2 3.3 V
OE# 5 6 CS#
5V 7 8 5V
PLD2 9 10 PLD1
N.C. 11 12 D7
D6 13 14 D5 D4 15 16 D3 D2 17 18 D1 D0 19 20 GND
NC 1 2 3.3 V
IFCLK 3 4 A15
A14 5 6 A13 A12 7 8 A11 A10 9 10 A9
A8 11 12 A7 A6 13 14 A5 A4 15 16 A3 A2 17 18 A1 A0 19 20 GND
Table 3-9. Pin Designation (P6)
Alternate Default P6 Default Alternate
NC 1 2 3.3 V
RD# 3 4 INT5#
INT4 5 6 T2
T1 7 8 T0
WAKEUP# 9 10 SDA
SCL 11 12 PE7 GPIFADR8
T2EX PE6 13 14 PE5 INT6
RxD1OUT PE4 15 16 PE3 RxD0OUT
T2OUT PE2 17 18 PE1 T1OUT T0OUT PE0 19 20 GND
24 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

3.6 ATA Connector P8

Table 3-10 shows the pinout for P8, a 40-pin connector that interfaces with a standard ATA cable.
This is for ATA use only. SP1, 2, and 3 should be bridged with the solder t o connect the ap propr iate pull-up and pull-down resistors required for ATA. An 80-pin cable is required for UDMA transfer modes and recommended for all transfer modes.
Table 3-10. P8 (ATA)
RESET# PA7 1 2 GND GND
DD7 PB7 3 4 PD0 DD8 DD6 PB6 5 6 PD1 DD9 DD5 PB5 7 8 PD2 DD10 DD4 PB4 9 10 PD3 DD11 DD3 PB3 11 12 PD4 DD12 DD2 PB2 13 14 PD5 DD13 DD1 PB1 15 16 PD6 DD14 DD0 PB0 17 18 PD7 DD15
GND GND 19 20 N.C. KEYPIN
DMARQ RDY1 21 22 GND GND
DIOW# CTL0 23 24 GND GND
DIOR# CTL1 25 26 GND GND IORDY RDY0 27 28 GND CSEL
DMACK# CTL2 29 30 GND GND
INTRQ PA0 31 32 N.C. RESERVED
DA1 PA2 33 34 N.C. PDIAG# DA0 PA1 35 36 PA3 DA2
CS0#PA43738PA5CS1#
DASP# 10K Pull-up 39 40 GND GND
Advanced Development Board

3.7 U2 - 22v10 Gate Array Logic (GAL)

A standard 22v10 GAL provides a general-purpose “glue logic” on the board. It provides the AND gate required to combine the PSEN and READ signals, adds memory map support, debug LEDs, and provides three spare outputs for customer-defined functions.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 25
Advanced Development Board

3.8 Memory Maps

Figure 3-1. Four EZ-USB Development Board Memory Maps
Note The GAL sets EA=1 for the Ext Flash configuration only, enabling external code memory. The factory default is to have both MM1 and MM0 jumpers removed. This setting should be used for
all development work using the Keil software tools.
The default configuration provides 16 KB of on-chip co de and data memory, plus 48 KB of exter-
nal RAM. The 8051 begins execution from internal RAM (the GAL sets EA=0). Although there is an apparent overlap between the internal 16 KB and the botto m 16 KB of the external RAM, EZ-USB disables RAM strobes for the bottom 16 KB, so there is no conflict. Th is EZ-U SB decod­ing allows using a standard 64-KB RAM without requiring external decoding to inhibit access to the bottom 16 Kb.
The second column, “24K gap”, enable s the external RAM only for access to its upper 32 KB.
This configuration is useful for systems that add external devices that require memory-mapped access. As with the default configuration, the 8051 begins execution from internal RAM (the GAL sets EA=0).
The third column, “Ext Flash”, allows a flash memory (or other ROM) to be connected to the 8051
bus. This is the only configuration that starts 8051 execution from external memory (the GAL sets EA to ‘1’). Because external memory occupies the bottom 16K, the internal EZ-USB RAM is addressed only as data memory, instead of the combined program/data memory in the other three configurations.
The fourth column, “Single Chip”, disables all external memory. This configuration is useful for
testing the final code to ensure that it does not use external resources present in the develop­ment environment.
26 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

3.9 I2C Expanders

U8 and U10 are Philips PCF8574 I/O expanders. They connect to the I2C bus SCL and SDA pins, and provide eight GPIO pins. U8 provides eight output bits, connected to the 7- segm ent r eadout U9. U10 provides eight input bits: four connect to push buttons S2–S5 and four are uncommitted.
U8 connects to the 7-segment readout (U9) using the following bit assignments. Figure 3-2. Bit Assignment
U8 has the group address 0100 and is strapped to the unit address 001. Therefore, to write a value to the 7-segment readout, 8051 firmware sends a control byte of 01000010 (the least significant bit (LSB0 indicates a write operation), followed by the da ta byte.
Advanced Development Board
U10 uses its I/O pins as inputs, connected to S2-S5 according to the followin g table.
Bit Switch
0S2 1S3 2S4 3S5
U9 has the group address 0100 and is strapp ed to unit address 000. Therefor e, to read the switch values, the 8051 firmware sends a control byte of 01000001 (the LSB indicates a read operation), and then reads the data byte.

3.10 Indicators – Power and Breakpoint

LED D1 is connected to the PCB 5-V power sup ply, which is normally supplied from the USB cable (VBUS pin). Alternatively, JP2 can be removed and an external 5-V power can be applied to the JP2 pin 1. In either case, D1 indicates the presence of the 5-V power.
LED D6 is connected to the 3.3-V voltage regulator output. LED D7 is connected to the EZ-USB breakpoint (BKPT) pin. When using the Keil software develop-
ment tools, this green LED indicates that the EZ-USB development board has enumerated and the Keil monitor has loaded and started running.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 27
Advanced Development Board

3.11 General-Purpose Indicators

A portion of the GAL (U2) decodes 8051 reads to cer t ain extern al memory a ddresses to tu rn the four general-purpose indicators D2–D5 on and off. The following figure shows the positions of the four indicator LEDs and a table of the external 8051 addresses, which are read to turn them on and off. The four jumpers above the LEDS must be installed to use this feature. These jumpers connect the LEDS to four GAL outputs.
Notes
The CLKOUT signal is used as a clock to latch the LED output signals from the GAL. If CLKOUT
is disabled, the LEDs will not update.
To use the LEDS for other purposes, such as wiring to other PC board signals for observation,
first remove the shorting plug to disconnect the LED from the GAL. The LED terminal is the bot­tom pin of the connector and the GAL I/O pin is the top pin.
Figure 3-3. Indicator LED Positions
Indicator Turn ON by Reading Turn OFF by Reading
D2 0x88-- 0x80-­D3 0x98-- 0x90-­D4 0xA8-- 0xA0-­D5 0xB8-- 0xB0--
The low address byte is “don’t c are”. This means you can efficiently add software test points using the following code:
D5ON: mov MPAGE,#B8h ; turn D5 on movx a,@r0 ; dummy read ; D5OFF: mov MPAGE,#B0h ; turn D5 off movx a,@r0 ; dummy read
This code example uses the 8051 8-bit indirect addressing mode. The MPAGE register (SFR 0x92) supplies the high address byte and r0 supplies the low address byte. Register r0 does not r equire ini­tialization because the low address byte is “don’t care” for the LED decoding.
To turn the LEDs ON and OFF using the C code, declare the external memory locations, and then read their values into dummy variables:
xdata volatile unsigned char D5ON _at_ 0xB800; xdata volatile unsigned char D5OFF _at_ 0xB000; unsigned char dum; dum = D5ON; // turn D5 on dum = D5OFF; // turn D5 off
Note Program execution a t these addresses do not activate the LEDs.
28 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D

4. Development Kit Contents

This section provides a detailed description of the structure and content of the EZ-USB DVK as it exists on a user PC after installation. The following image shows the root-level tree after DVK instal­lation. This assumes that all the DVK components are installed (the default installation type is ‘Typi­cal’). Subsequent sections detail the contents of each sub-directory. The DVK installer installs several files related to the development board in the Windows directory tree as shown in Figure 4-1. The default directory for the CY3674 kit is C:\Cypress\USB\CY3674_EZ-USB_FX1_DVK\ an d for the CY3684 kit, it is C:\Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\. In further sections, the default installation directory is referred to as <Installed_directory>, which refers to the default directory of the respective EZ-USB kits.
Figure 4-1. CY3684 Development Kit Content Structure

4.1 Bin

This folder contains the following utilities
Cyscript.exe: This utility is used to generate script files for the equivalent firmware(.hex) files
Hex2bix.exe: This utility is used to convert a firmware image compatible to the RAM memory
(.hex) to an EEPROM image (.iic).
Setenv.bat: This is a batch file to set path variables for the Keil compiler and firmware examples.
Click on this batch file to set the environment variables necessary before compiling the firmware examples of the kit.
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 29
Development Kit Contents

4.2 Documentation

This directory contains documentation, which describes the EZ-USB DVK. The following table lists the summary of the documents in the CY3674 and CY3684 EZ-USB development kits.
Table 4-1. Documents Summary for EZ-USB FX1 and FX2LP Development Kits
Kit Specific/
S.No
1 FX1(CY3674)
Common
Documents
Document Description
Migrating From AN21XX TO FX1 ­AN5040.pdf
Silicon Errata For EZ-USB FamilY.pdf
EZ-USB FX1 Datasheet.pdf Datasheet for EZ-USB FX1 IC
FX1 Product
Application note to assist users to migrate from Older Anchor IC to EZ-USB FX1
Errata for EZ-USB FX1 IC
2 FX2LP(CY3684)
3 Common documents

4.3 Drivers

This directory contains Microsoft-certified, signed Cypress USB drivers for different Windows OS platforms, such as Window 2000 (32-bit) and Windows XP, Vista, and 7 in 32- and 64-bit OS plat-
Migrating From EZ-USB FX2 USB FX2LP
EZ-USB® FX2LP Datasheet.pdf Errata For The EZUSB-FX2LP.pdf Errata for EZ-USB FX2LP IC Release Note EZ-USB FX1-EZ-USB
FX2LP
EZ-USB ual.pdf
EZ-USB FX1-EZ-USB FX2LP ment Kit Quick Start Guide.pdf
EZ-USB® Development Kit User Guide.pdf
- AN4078_C.pdf
Development Kit.pdf
®
Technical Reference Man-
To EZ-
Develop-
Application note to assist users to migrate from EZ-USB FX2 to EZ­USB FX2LP
Datasheet for EZ-USB FX2LP IC
Release notes for both EZ-USB FX1 and FX2LP development kits
Detailed manual which explains the in detail about the entire IP blocks and registers inside EZ-USB device.
Quick start guide for EZ-USB FX1 and FX2LP devices.
This guide provides detailed instructions on Kit software installa­tion, Kit hardware, firmware exam­ples and PC tools functionality.
30 EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
Loading...
+ 87 hidden pages