background image

 
 

 

Introduction to EZ-USB® FX3’s High-Speed USB Host Controller 

 

 

www.cypress.com

 

Document No. 001-77960 Rev. ** 

USB Hosts and Peripheral Devices 

USB is a tiered star network that consists of one host and 
one or more peripheral devices. The host initiates all 
communication on the bus. Peripherals may send data to 
the host only when the host requests it. Peripherals must 
be able to receive the data that the host sends. To expand 
the number of peripherals you can use a hub. Typically, a 
hub allows four or seven peripherals to attach to an 
upstream port. A maximum of five hubs can be chained 
together, creating as many as five tiers. A maximum of 
127 peripherals (including the hubs) can be connected on 
the bus to a single host. 
 
Most USB peripheral devices are categorized by classes. 
Each class has special requirements for its communication 
protocol. The host must be able to recognize a peripheral 
device’s class and meet the class requirements, or the 
host cannot communicate with the device. Two common 
classes are HID (human interface device), such as a 
mouse, and mass storage class (MSC), such as a flash 
drive. Class drivers running on the host give application-
level support for class-specific communication. Because 
some USB peripheral devices are vendor-specific, they do 
not fall into one of the predefined classes. For those 
peripheral devices, specific client drivers must be written. 
 

Host Versus Embedded Host 

A USB embedded host differs from a USB host in several 
small, but important, ways. A USB embedded host does 
the following: 

 

supports only specific peripheral devices or classes of 
peripheral devices, or both; 

 

supports only transfer types required by the supported 
peripheral devices; 

 

offers optional hub support; and 

 

has a relaxed power requirement. 

These restrictions allow an embedded host to be 
implemented on a device with fixed, limited memory. 
 

USB On-The-Go (OTG) 

USB On-The-Go (OTG) allows two USB peripherals to talk 
to each other without requiring a personal computer. 
Although OTG appears to add peer-to-peer connections, 
in fact, USB OTG retains the standard USB 
host/peripheral model. OTG introduces the dual-role 
device (DRD) capable of functioning as either host or 
peripheral. One important aspect of OTG is that a host 
and peripheral can switch roles when necessary. 
 

FX3 USB Subsystem Overview 

The FX3 USB block includes: 

 

USB 3.0 function controller 

 

USB 2.0 function controller 

 

USB 2.0 embedded host controller  

 

USB 2.0 OTG controller 

The  USB 3.0 and USB 2.0 subsystems have dedicated 
transceivers, but they  share the same  I/O  interconnect in 
the backend.  

The FX3 USB block supports  the following modes  of 
operation: 

 

USB 3.0 peripheral in SuperSpeed (5 Gbps) 

 

USB 2.0 peripheral  in high/full speed (480/12 Mbps, 
respectively) 

 

USB 2.0 host in high/full/low speed (480/12/1.5 Mbps 
respectively), with one downstream port.  The hub is 
not supported. 

 

USB 2.0 OTG DRD, with Host  Negotiation  Protocol 
(HNP) and Session Request Protocol (SRP) support. 

Figure 1. EZ-USB FX3 Subsystem 

EZ-USB FX3

USB Subsystem

USB 

3

.0 

PHY

USB 2.0 Host

Controller

SSTX+

SSTX-

USB 

2

.0 

PHY Mux

USB 

2

.0 

OTG 

PHY

USB 2.0 

Function

Controller

USB 3.0 

Function

Controller

Internal IO Interconnect

OTG 

Controller

SSRX+

SSRX-

D+

D-

Voltage

Regulator

OTG_ID

VBUS

VBATT

 

Because this  document  focuses only on  introducing  the 
high-speed  USB host controller  of FX3, the following 
section and subsequent example focus only  on USB 2.0 
host functionality. 

 

Summary of Contents for AN77960

Page 1: ...as almost completely replaced other communication methods between peripheral devices and a PC This holds true both for general purpose devices such as flash drives and mice and special purpose devices for specific applications According to the standard USB 2 0 specifications USB peripherals may not communicate directly with one another they may communicate only with a USB host which fully controls...

Page 2: ...vices or both supports only transfer types required by the supported peripheral devices offers optional hub support and has a relaxed power requirement These restrictions allow an embedded host to be implemented on a device with fixed limited memory USB On The Go OTG USB On The Go OTG allows two USB peripherals to talk to each other without requiring a personal computer Although OTG appears to add...

Page 3: ...ints 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 u...

Page 4: ...on 2 Within the Eclipse IDE select File Import 3 An Import window pops up Select Existing Projects into Workspace then click Next 4 Click the radio button for Select root directory then click Browse 5 Browse to the example project directory and select the cyfxusbhost example then click OK The example project directory is usually located at FX3_INSTALL_PATH firmware basic_examples ...

Page 5: ...and recompile the project From the Project Explorer pane expand the USBHost project and then double click cyfxusbhost h to open the file Within the file change lines 44 and 45 from define CY_FX_HOST_VBUS_ENABLE_VALUE CyFalse define CY_FX_HOST_VBUS_DISABLE_VALUE CyTrue to define CY_FX_HOST_VBUS_ENABLE_VALUE CyTrue define CY_FX_HOST_VBUS_DISABLE_VALUE CyFalse After you make the changes it is ready t...

Page 6: ...w Zylin Embedded debug Native On the left pane under the Main tab the Project and C C Application fields automatically populate If not click on Browse and select them manually 4 On the left pane select the Debugger tab Type arm none eabi gdb exe in the GDB debugger field Select Verbose console mode 5 Select Commands tab type in target remote localhost 2331 monitor memU32 0xE0052000 0x15 under the ...

Page 7: ...ttings Figure 3 Required Jumper and Switch Settings OTG_ID J50 Close VBUS_IN J47 Close V5P0 J40 Close UART J101 104 1 2 PMOD 2 0 Routing J96 2 3 J97 2 3 J98 Open VBUS_CTRL J100 2 3 PMOD 2 0 SW40 1 ON SW40 2 ON SW40 3 OFF SW40 4 OFF OTG_ID J50 Close VBUS_IN J47 Close V5P0 J40 Close UART J101 104 1 2 PMOD 2 0 Routing J96 2 3 J97 2 3 J98 Open VBUS_CTRL J100 2 3 PMOD 2 0 SW40 1 ON SW40 2 ON SW40 3 OFF...

Page 8: ...st Project on FX3 DVK 1 Start the Segger J Link GDB Server by Start All Programs SEGGER J Link ARM Vx xxx J Link GDB Server via JTAG The SEGGER J Link GDB Server Vx xxx window pops up Power up the FX3 DVK board and then the ARM9 Core Id 0x07926069 shows up in the Target field Change the initial JTAG speed to 1000 kHz and select Little endian ...

Page 9: ...Introduction to EZ USB FX3 s High Speed USB Host Controller www cypress com Document No 001 77960 Rev 9 2 Now it is time for the firmware download Under Debug Configurations click Debug ...

Page 10: ...irmware execution stops at the breakpoint in main function 4 On top of the Debug pane select the Resume button If the FX3 USB host controller is running a line that says OTG Event 2 Input 1 shows up in the UART terminal set to 1152008N1N 5 Plug in either the USB flash drive or mouse to the DVK s USB port using the Micro B to A adapter The respective output shows in the UART terminal ...

Page 11: ...ost controller showed you a simple way to bring USB host capability to embedded applications Included in the document were associated library and firmware examples in the SDK As a result this application note gave you everything you need to start an implementation with ease About the Author Name Hingkwan Huen Title Systems Engineer Sr Staff Contact hkh cypress com ...

Page 12: ... www cypress com Document No 001 77960 Rev 12 Document History Document Title Introduction to EZ USB FX3 s High Speed USB Host Controller Document Number 001 77960 Revision ECN Orig of Change Submission Date Description of Change 3606545 HKH 05 2 2012 New Spec ...

Page 13: ...s 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 This Source Code software and or firmware is owned by Cypress Semiconductor Corporation Cypress and is protecte...

Reviews: