background image

 

 

www.cypress.com

 

Document No. 001-77960 Rev. ** 

AN77960 

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

Author: Hingkwan Huen] 

Associated Project: No 

Associated Part Family: EZ-USB® FX3 

Software Version: FX3 SDK Full Package, v1.1 

Related Application Notes:  

AN75705 - Getting Started with FX3 

If you have a question, or need help with this application note, contact the author at 

[email protected]

. 

 

 

AN77960 describes how the high-speed Universal Serial Bus (USB) host controller in the 
EZ-USB® FX3™ allows embedded systems to connect to a variety of USB peripherals. A 
hands-on USB host example in this document can help developers create applications for 
FX3’s high-speed USB host controller. 

 

 

Contents 

Introduction ....................................................................... 1

 

USB Overview ................................................................... 1

 

FX3 USB Subsystem Overview ......................................... 2

 

FX3 High-Speed USB Host Controller ............................... 3

 

FX3 USB Host API from SDK v1.1 .................................... 3

 

Running the FX3 USB Host Example ................................ 3

 

Summary ......................................................................... 11

 

Worldwide Sales and Design Support ............................. 13

 

 

Introduction 

USB  is so commonplace that it has  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  data traffic on the bus. The  Cypress 
EZ-USB  FX3 with integrated high-speed  USB  host 
controller, along with the USB function and On-The-Go 
(OTG) controllers,  accomplishes two things: It  retains the 
device functions  and  allows  embedded

 

systems  to  act  as 

a USB host. 

This document has two goals: to introduce the high-speed 
USB  host  controller integrated in the FX3 device  and  to 
describe how  to  create  applications based  on the USB 
host example given in the FX3 Software Development Kit 
(SDK) version 1.1. 

 

USB Overview 

This section briefly defines the terms referenced in this 
document as well as those required to understand the 
system operation. There are many excellent references 
about USB, including the USB 2.0 Specification, that cover 
higher-level details. 
 

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: