Application Note
3 of 42
001-65209 Rev.*I
2021-03-19
Getting Started with FX2LP™
Introduction
1
Introduction
The Cypress EZ-USB FX2LP (hereafter abbreviated as FX2LP) is a flexible USB 2.0 PERIPHERAL controller
designed to handle maximum USB 2.0 bandwidth. To take full advantage of the USB 2.0 480 Mbps signaling
rate, FX2LP contains specialized hardware to buffer the USB data and connect seamlessly to a variety of high-
bandwidth external devices such as MCUs, ASICs, and FPGAs. After a brief introduction to USB 2.0, this
application note describes FX2LP features that contribute to its high throughput.
Any IC is only as good as the tools that support it, so the remaining sections of this application note introduce
the
(DVK) and the FX2LP firmware and software development tools. A companion zip
file contains folders with code samples and an application is described in detail in this application note. Briefly,
they are as follows:
1.1
Bulkloop_FX2LP Project
The Bulkloop project attached to this application note shows how to structure the FX2LP firmware to create a
USB device. Much of the USB request handling is done by a Cypress-provided USB Firmware Framework, with
the user code required only for the specific application requirements. The
bulkloop.c
file contains a full USB
device template that can serve as the basis for a custom application.
Cypress tools include a free evaluation version of Keil uVision2 for the FX2LP CPU (8051). The Keil uVision2
Integrated Development Environment (IDE) compiles the user code and USB Firmware Framework to produce
the hex file. This hex file needs to be loaded by the provided
USB Control Center
application and exercised by
the provided
Bulkloop_VCS
application.
As part of the firmware tools discussion, the GPIF Designer program is introduced to show how custom
interfaces are created using graphical waveform entry (see
).
1.1.1
VS_Control Center
This is a Microsoft Visual Studio solution, written in Visual C#, that creates an application called
USB Control
Center
. This application is used to download the FX2LP code (a hex file) into the FX2LP Development Kit. The
executable is provided for instant use and the source code is provided for reference. It uses the Cypress .NET
library, demonstrating the use of many of its high-level functions.
1.1.2
Bulkloop_VCS
This is a simple Windows Visual Studio application written in Visual C#. It features continuous data looping and
byte counting that can be used to measure USB transfer bandwidths with various USB controller cards and
computers. As with the USB Control Center, both the source code and executable are provided.
1.1.3
Windows Driver and Library
Cypress provides a Windows driver to support FX2LP-based designs. It supports all USB transfer types, and is
available in binary form for use with customer products.
The USB Control Center and Bulkloop_VCS applications use
CyUSB.dll
,
a managed Microsoft .NET class library
provided by Cypress. This makes it compatible with the Visual Basic.NET, Visual C#, Visual C++ (Win Forms), and
Visual J# languages. This library provides high-level calls that hide driver complexity and present a very simple
USB programming model.