Introduction to EZ-USB® FX3’s High-Speed USB Host Controller
Document No. 001-77960 Rev. **
3
FX3 High-Speed USB Host Controller
The FX3 high-speed USB host controller has the following
features:
•
Complies with the USB 2.0 standard for high-speed
(480 Mbps), full-speed (12 Mbps) and low-speed (1.5
Mbps) functions
•
Supports all transfer types: control, bulk, isochronous,
and interrupt
•
Supports SRP and HNP
•
Supports suspend/resume and remote wakeup
•
Supports high-bandwidth isochronous and interrupt
transfers
•
15 IN endpoints and 15 OUT endpoints in addition to
control endpoint 0
•
Flexible endpoint configurations with the following
properties:
o
All endpoints are mapped to system memory
o
All available memory can be allocated to
endpoints
o
Can be dynamically sized by firmware
•
Performs all transaction scheduling in hardware
FX3 USB Host API from SDK v1.1
The architecture of the USB host is complicated. In most
cases, developers are required to know about the host
internal, as well as USB’s protocol, to program a USB
host. The FX3 SDK v1.1 includes a set of plug-and-play
building blocks, including the USB host API module, to
reduce
the complexity
and
simplify the system
development of the FX3 USB host. Available API functions
are highlighted below.
•
Start and stop the USB host stack
•
Enable/disable the USB host port
•
Reset/suspend/resume the USB host port
•
Get/set the device address
•
Add/remove/reset an endpoint
•
Schedule and perform EP0 transfers
•
Set up/abort data transfers on endpoints
Details of each function call and its usage are described
and documented in the following C header file.
${FX3_INSTALL_PATH}\firmware\u3p_firmware\inc\cyu3u
sbhost.h
Running the FX3 USB Host Example
Available in the FX3 SDK v1.1 are a set of examples that
demonstrates the usage case of the FX3 high-speed USB
host. These examples include:
cyfxusbhost
– FX3 as a USB host
This example demonstrates the use of FX3 as a USB 2.0
single-port host. It supports simple HID-class and simple
MSC-class devices.
cyfxusbotg
– FX3 as an OTG device
This example demonstrates the use of FX3 as an OTG
device. When FX3 is connected to a PC USB host, it acts
as a bulk loopback peripheral device. When it is
connected to a USB mouse, it can detect and track the
mouse clicks, X-Y coordinates, and scroll changes.
cyfxbulklpotg
– FX3 connected to FX3 as an OTG device
This example demonstrates the full OTG capability of the
FX3. When FX3 is connected to a PC USB host, it acts as
a bulk loopback peripheral device. When it is connected to
another FX3 running the same the firmware, it
demonstrates SRP and HNP.
Although a step-by-step procedure is given only to the
cyfxusbhost
example in this section of the document, the
other two examples follow the same idea.
Figure 2. cyfxusbhost Example Setup
To successfully run the cyfxusbhost example, you
need the following software tools and hardware
components:
•
FX3 SDK Version 1.1 Release
o
Eclipse CDT IDE with Zylin GDB plug-in
o
Example source and API libraries
o
GNU ARM compiler
•
Segger J-Link and J-Link GDB server application
•
UART terminal and application (e.g., Teraterm)
•
FX3 DVK with 5-V power supply
•
Standard USB mouse and USB flash disk
•
USB micro-B to standard-A adapter