Application Note AN_250. Configuring FT313H Driver for Embedded Linux



Similar documents
Technical Note TN_146. Creating Android Images for Application Development

Application Note AN_385. FTDI D3XX Driver Installation Guide

Technical Note TN_152. USB 3.0 Compatibility Issues Explained

Application Note AN_243. FT312D USB Host to UART Cable Application

Application Note AN_242

Technical Note. TN_132 Adding FTDI Devices VCP Driver Support to Android

Technical Note. TN_134 FTDI Android D2XX Driver

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows 7

Application Note AN_241. FTDI_AOA_HyperTerm_User_Manual

White Paper WP_001. Connecting Peripherals to an Android Platform

Future Technology Devices International Ltd. Application Note AN_234. FTDI Drivers Installation guide for. Windows 8

Application Note AN_101. Submitting Modified FTDI Drivers for Windows Hardware Certification

UMFT4222PROG FT4222 Programmer Module

Determining USB Peripheral Device Class

Technical Note TN_158. What is the Camera Parallel Interface?

Application Note AN_276. FT800 Audio File Conversion

Application Note AN_149. Upgrading a passive DB9 RS232 Interface to an active USB Interface using an FTDI DB9-USB-RS232 Module

Application Note. AN_136_Hi-Speed Mini Module EEPROM Disaster Recovery

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

White Paper WP_003. Android Peripheral Options

Future Technology Devices International Ltd

Future Technology Devices International Ltd. Technical Note TN_101

Technical Note. TN_147 Java D2xx for Android

Future Technology Devices International Ltd

FTDI Chip. VM800P Datasheet Embedded Video Engine Plus Module. VM800P Embedded Video Engine Plus Module Datasheet Version 1.0

Future Technology Devices International Ltd. USB NMC-2.5m. USB to USB Null Modem Cable. Datasheet

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

Application Note AN_185. Vinculum-II UART to USB HID Class Host Bridge

USB Hi-Speed Serial/Hub Module. Datasheet

FT2232H Mini Module. USB Hi-Speed FT2232H Evaluation Module. Datasheet

Future Technology Devices International Ltd. USB-Key. Datasheet

Command Processor for MPSSE and MCU Host Bus Emulation Modes

Simplified Description of USB Device Enumeration

Application Note AN_254. FT800 Designs With Visual TFT

Future Technology Devices International Ltd. AN232R-02 FTDIChip-ID for the FT232R and FT245R

TTL-232R-PCB. TTL to USB Serial Converter PCB. Datasheet

Application Note AN_208. FT311D and FT312D Demo_APK_User_GuideFT311D and FT312D Demo_APK_User_Guide

C232HD. USB 2.0 Hi-Speed to UART Cable. Datasheet

VF2F. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit. Future Technology Devices International Ltd. Preliminary - Subject to Change

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

7inch HDMI LCD (B) User Manual

VDIP1. Vinculum VNC1L Module. Datasheet

Future Technology Devices International Ltd. USB to RS232 UART Serial Converter PCB. Datasheet

Future Technology Devices International Ltd. Windows XP Installation Guide

Future Technology Devices International Ltd USB TO RS422 UART SERIAL CONVERTER PCB. Datasheet. Document Reference No.: FT_000119

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows VISTA

Future Technology Devices International Ltd

C232HM. USB 2.0 Hi-Speed to MPSSE Cable. Datasheet

Technical Note TN_105

Future Technology Devices International Ltd. Windows 2000 Installation Guide

Future Technology Devices International Ltd. VF2F2. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit.

SheevaPlug Development Kit README Rev. 1.2

The embedded Linux quick start guide lab notes

Procedure to Create and Duplicate Master LiveUSB Stick

Vinco Development Module. Datasheet

USB-COM232-PLUS4. Datasheet

USB-COM422-PLUS1. Datasheet

USB-COM422-PLUS2. Datasheet

Application Note AN_146. USB Hardware Design Guidelines for FTDI ICs

The DB9-USB Family of. UART Converter Modules. Datasheet

Pwn Plug Community Edition 1.1 Installation Guide

Software Prerequisites Linux Ubuntu LTS. Estimated completion time: 15min. The goal of this hands-on is to:

Newton2 Developers Guide

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Application Note AN_252. FT800 Audio Primer

Future Technology Devices International Ltd. USB to RS232 Serial Converter Range of Cables. Datasheet

DB9-USB-RS232 Module. Male & Female. Datasheet

Intel Compute Stick STCK1A32WFC User Guide. Intel Compute Stick STCK1A32WFC

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Chapter 1 Hardware and Software Introductions of pcduino

USB Stick Driver Installation Instructions

5inch HDMI LCD User Manual

Raspberry Pi Setup Tutorial

TTL-232R-3V3 USB to TTL Serial Converter Cable

PL2303 USB-to-Serial Controller Android USB Host Solution (How to Connect PL2303 Device to Android Tablets & Phones)

Digital Photo Bank / Portable HDD Pan Ocean E350 User Manual

BeagleBone Black: Installing Operating Systems

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Application Development Kit for Android Installation Guide

USB 2.0 Flash Drive User Manual

ERIKA Enterprise pre-built Virtual Machine

User Manual. 2 ) PNY Flash drive 2.0 Series Specification Page 3

How to Install Applications (APK Files) on Your Android Phone

Accessing I2C devices with Digi Embedded Linux 5.2 example on Digi Connect ME 9210

An Embedded Wireless Mini-Server with Database Support

USB Driver. Installation Guide for LTE Devices

Embedded Linux Platform Developer

Quick Start Guide. Quick Start Guide. taskit GmbH. for Portux920T EU / SW Portux Mini-PC Portux Panel-PC Panel-Card MoLUX Stamp

Moxa Device Manager 2.0 User s Guide

For Windows XP 64 bit

Chipsee Embedded Industrial Computer Android User Manual V1.0.1

SSD Guru. Installation and User Guide. Software Version 1.4

SBC6245 Single Board Computer

The Tor VM Project. Installing the Build Environment & Building Tor VM. Copyright The Tor Project, Inc. Authors: Martin Peck and Kyle Williams

SBC8600B Single Board Computer

Buildroot Workshop. Libre Software Meeting Thomas Petazzoni Free Electrons

Intel Data Migration Software

Transcription:

AN_250 Configuring FT313H Driver for Embedded Linux Issue Date: 2013-11-01 This application note shows the user how to configure driver files for the FT313H USB High Speed Host Controller. Use of FTDI devices in life support and/or safety applications is entirely at the user s risk, and the user agrees to defend, indemnify and hold FTDI harmless from any and all damages, claims, suits or expense resulting from such use. Future Technology Devices International Limited (FTDI) Unit 1, 2 Seaward Place, Glasgow G41 1HH, United Kingdom Tel.: +44 (0) 141 429 2777 Fax: + 44 (0) 141 429 2758 Web Site: http://ftdichip.com

Table of Contents 1 Introduction... 2 1.1 Scope... 2 1.2 Hardware Required... 2 1.3 Linux Operating System and Development Tools... 2 1.3.1 Installation of tools and source files... 2 1.3.2 Create Bootstrap program... 3 2 Introduction to Linux Drivers... 4 2.1 Drivers used by the FT313H and the embedded system... 4 2.2 FTDI Driver Files for FT313H... 5 2.3 Building the Kernel... 5 2.4 Build UBI files... 7 3 4 5 6 Loading new driver onto DevKit... 8 Demonstrating device support for FT313H... 9 Summary... 10 Contact Information... 11 Appendix A References... 12 Document & Website References... 12 Acronyms and Abbreviations... 12 Appendix B List of Tables & Figures... 13 List of Figures... 13 Appendix C Revision History... 14 1

1 Introduction This document shows how to configure the driver files for the FT313H High Speed Host Controller for use in an embedded Linux single board computer (SBC). The driver files are simple text files and can be easily modified to allow the FT313H to communicate with a variety of embedded Linux SBCs. 1.1 Scope This document is designed as an introduction to Platform drivers and USB Host drivers for the FT313H device with a simple embedded Linux system. It is assumed the user is familiar with basic Linux commands and Linux based Operating Systems such as Ubuntu. This document covers FT313H drivers only, and does not describe hardware implementation details of the FT313H. 1.2 Hardware Required DevKit 8600 Embedded Linux board UMFT313EV Development Module Adapter board to bridge DevKit bus interface connector with UMFT313EV development module. (note: adapter board is a custom part dependent upon the system processor ) USB Hub FTDI USB to Serial DB9 cable. Linux PC with SD card reader 2 GB micro SD card with SD card adapter. 1.3 Linux Operating System and Development Tools Angstrom Linux source files and development tools are provided with the DevKit 8600 installation CD (Tools/Drivers CD is provided with purchase of DevKit from Embest). It assumed the user is familiar with tools such as Menuconfig and other Linux utilities for building custom Linux kernels for embedded systems. Source Files and Tools Required from DevKit CD: Linux 3.x sdk kernel directory U-boot bootstrap loader directory Cross compile tools directory Note: Users of other embedded systems should consult the support websites of these systems. 1.3.1 Installation of tools and source files In a Linux terminal window on the Linux PC, create the following home directory and extract the following tar files from the CD or install package: mkdir $HOME/tools cd /media/cd/linux/tools (depends on your source) tar xvf arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2-c $HOME/tools tar xvf arm-eabi-4.4.0.tar.bz2 C $HOME/tools Copy the following compile utilities to the tools directory: cp /media/cd/linux/tools/mkimage $HOME/tools cp /media/cd/linux/tools/mkfs.ubifs $HOME/tools 2

cp /media/cd/linux/tools/ubinize $HOME/tools cp /media/cd/linux/tools/ubinize.cfg $HOME/tools Add environment variables to allow use of above tools: export PATH=$HOME/tools/arm-2009q1/bin:$HOME/tools/arm-eabi -4.4.0/bin:$HOME/tools:$PATH The next step is to extract and install the kernel source directories from disc or other archive: mkdir $HOME/work cd $HOME/work tar jxvf /media/cdrom/linux/source/u-boot-2011.09-psp04.06.00.03.tar.bz2 tar jxvf /media/cdrom/linux/source/linux-3.1.0-psp04.06.00.03.sdk.tar.bz2 1.3.2 Create Bootstrap program To create the u-boot loader, run the following commands cd u-boot-2011.09-psp04.06.00.03 make distclean make devkit8600_config make When these steps are complete, the u-boot directory will contain the required MLO and u-boot.img files. 3

2 Introduction to Linux Drivers 2.1 Drivers used by the FT313H and the embedded system Embedded Linux systems such as the DevKit8600 and Beaglebone do not use a standard interface bus like PCI-X for desktop PCs. Instead, external hardware is plugged directly into the system bus. There is a special driver file called the Platform driver that configures the ARM processor and its support chips to talk to external devices such as the FT313H. The Platform driver is analogous to the Board Support Package (BSP) used by embedded Windows CE systems. In addition, there is a specialized Host Controller driver (HCD) for the FT313H to communicate with the USB stack on the embedded system. Both the Platform driver and HCD driver are compiled when building the kernel image file for the embedded system. Figure 2.1 shows the relationship between the FT313H, system bus and the embedded OS. Figure 2.1 USB Driver Flow 4

2.2 FTDI Driver Files for FT313H Download the driver files from the FT313 drivers link on the FTDI website. The Platform driver file is board-am335xevm.c This file is used to configure the GPMC (general purpose memory controller) module of the ARM processor. The structure of this file depends on the ARM processor and support hardware used in the embedded Linux system. The included file is optimized for the DevKit 8600. This file is contained in the FT313H_Platform.tar archive. The Host Controller driver is the next higher level driver for the FT313H. This driver consists of several separate files that need to be compiled. The FT313H HCD driver files are contained in the FT313H_hcd_demo.zip archive. These files need to be copied into the ARM driver source directories before building the new kernel image files: Copy board-am335xevm.c to /linux-3.1.0-psp04.06.00.03.sdk/arch/arm/mach-omap2 Copy the ft313h_hcd_demo files to /linux-3.1.0-psp04.06.00.03.sdk/drivers/usb/host There are also two sets of Makefiles and Kconfig files that are used for compiling the ft313h_hcd driver files. The Makefile is a script that creates the required kernel components. The Kconfig files guide the operation of the menuconfig utility. These files are contained in the Make_Kconfig.tar archive. Extract Make_KCon_drivers_usb to /linux-3.1.0-psp04.06.00.03.sdk/drivers/usb Extract Make_KCon_drivers_usb_host to /linux-3.1.0-psp04.06.00.03.sdk/drivers/usb/host Now that the FT313H platform and host controller drivers have been copied to the correct locations, the next task is to build the kernel. This process will differ depending on the embedded Linux system in use. 2.3 Building the Kernel In a terminal window, go the the $HOME/work/ linux-3.1.0-psp04.06.00.03.sdk directory. make distclean make devkit8600_defconfig make menuconfig Menconfig will start with following menu, scroll down to reach device drivers. Hit enter to select. Figure 2.2 Menuconfig Device Drivers 5

If menuconfig reports an error, make sure you have installed the ncurses library: sudo apt-get install ncurses-dev Next, scroll down in the device drivers menu to USB Support and select: Figure 2.3 Menuconfig USB Support Under USB Support, you should be able to find the FT313H entry. Enter Y to select FT313H support: Figure 2.4 Menuconfig FT313H Support 6

Back up to the first page in menuconfig by entering <ESC> <ESC> until you reach the following page. Select Yes to save and exit: Figure 2.5 Save Changes to Menuconfig In a terminal window, enter make uimage This will build the new kernel image, and will take approx. 30 minutes. The new kernel image will be created in subdirectory /arch/arm/boot. 2.4 Build UBI files Go to the top level work directory: cd $HOME/work sudo $HOME/tools/mkfs.ubifs -r rootfs -m 2048 -e 126976 -c 812 -o ubifs.img sudo $HOME/tools/ubinize o ubi.img -2048 p 128 KiB s 512 O 2048\ $HOME/tools/ubinize.cfg The required ubi.img file will be created in the work directory. 7

3 Loading new driver onto DevKit The DevKit 8600 uses NAND flash and does not require a multiple partition SD card as with Android. Copy the following files (MLO, u-boot.img, uimage and ubi.img) on to a micro SD card formatted for FAT32. Plug in a FTDI USB to Serial cable to the DB9 monitor port on the side of the DevKit and plug the USB side into the Linux PC. Set up a TTY application on your Linux PC (such as GtKTerm) for a baud rate of 115.2 KBaud, no flow control. Port name will be /dev/ttyusb0. Insert the micro SD card into the micro SD socket of the DevKit 8600. Press the reset button. In the TTY window, you will see a startup prompt and a rapid countdown. Hit any key to stop auto- boot. You are now in u-boot mode. In the TTY window, you should see the Dev Kit prompt. Enter run updatesys after the prompt. DevKit8600# run updatesys You will see messages similar to the following in the TTY: NAND erase.chip device 0 whole chip OK Reading MLO 44371 bytes read HW ECC BCH8 Selected NAND write: device 0 offset 0x0, size 0x9705 37192 bytes written OK Reading u-boot.img 232456 bytes read HW UHCC BCH8 selected NAND Write Reading uimage NAND write device 0 offset 0x280000, size 0x2d8970 2984304 bytes written OK Reading ubi.img NAND wite device 0 offset 0x780000, size 0x138000 204447232 bytes written OK If the LEDS adjacent to the micro SD socket are flashing, the update is finished. Eject the micro SD card and reboot the DevKit 8600. This will boot the new kernel. 8

4 Demonstrating device support for FT313H With the DevKit connected to an LCD monitor and a USB keyboard connected to the UMFT313EV board via a hub, you will see the Angstrom Linux boot screen and login prompt. The keyboard should be able to talk to the the DevKit via the FT313H. This confirms a successful inclusion of the FT313H driver into the linux kernel. Enter root as the password. You can use Linux commands to observe OS files and run a simple graphics demo. To show USB slave devices, just enter dmesg grep USB. You can easily rebuild the kernel to include FTDI USB to Serial support (available in Menuconfig). You will also need to install a command line based TTY such as MiniTerm, Kermit or cu. 9

5 Summary This is a simple introduction to installing and configuring the FT313H platform and Host driver on the Embest DevKit 8600. With small changes, this procedure can be adapted to run on other embedded Linux platforms such as the BeagleBone Black and Raspberry Pi. 10

6 Contact Information Head Office Glasgow, UK Future Technology Devices International Limited Unit 1, 2 Seaward Place, Centurion Business Park Glasgow G41 1HH United Kingdom Tel: +44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) sales1@ftdichip.com support1@ftdichip.com admin1@ftdichip.com Branch Office Tigard, Oregon, USA Future Technology Devices International Limited (USA) 7130 SW Fir Loop Tigard, OR 97223-8160 USA Tel: +1 (503) 547 0988 Fax: +1 (503) 547 0987 E-Mail (Sales) E-Mail (Support) E-Mail (General Enquiries) us.sales@ftdichip.com us.support@ftdichip.com us.admin@ftdichip.com Branch Office Taipei, Taiwan Future Technology Devices International Limited (Taiwan) 2F, No. 516, Sec. 1, NeiHu Road Taipei 114 Taiwan, R.O.C. Tel: +886 (0) 2 8791 3570 Fax: +886 (0) 2 8791 3576 Branch Office Shanghai, China Future Technology Devices International Limited (China) Room 1103, No. 666 West Huaihai Road, Shanghai, 200052 China Tel: +86 21 62351596 Fax: +86 21 62351595 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) tw.sales1@ftdichip.com tw.support1@ftdichip.com tw.admin1@ftdichip.com E-mail (Sales) E-mail (Support) E-mail (General Enquiries) cn.sales@ftdichip.com cn.support@ftdichip.com cn.admin@ftdichip.com Web Site http://ftdichip.com System and equipment manufacturers and designers are responsible to ensure that their systems, and any Future Technology Devices International Ltd (FTDI) devices incorporated in their systems, meet all applicable safety, regulatory and system-level performance requirements. All application-related information in this document (including application descriptions, suggested FTDI devices and other materials) is provided for reference only. While FTDI has taken care to assure it is accurate, this information is subject to customer confirmation, and FTDI disclaims all liability for system designs and for any applications assistance provided by FTDI. Use of FTDI devices in life support and/or safety applications is entirely at the user s risk, and the user agrees to defend, indemnify and hold harmless FTDI from any and all damages, claims, suits or expense resulting from such use. This document is subject to change without notice. No freedom to use patents or other intellectual property rights is implied by the publication of this document. Neither the whole nor any part of the information contained in, or the product described in this document, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow G41 1HH, United Kingdom. Scotland Registered Company Number: SC136640 11

Appendix A References Document & Website References TN_146 Creating Android Images for App Development Building Embedded Linux Systems, Karim Yaghmour and Jon Masters, O Reilly Media Getting Started with the BeagleBone and BeagleBone Black Gentoo Linux on the BeagleBone Acronyms and Abbreviations Terms KConfig Makefile Menuconfig MLO SBC U-Boot UBI uimage Description File that configures options for Menuconfig. Script that builds executable programs and libraries from source code Linux utility for building a customized kernel image. Stage 1 boot loader for embedded Linux systems. MLO loads the Stage 2 boot loader, U-Boot. Single Board Computer Stage 2 boot loader for embedded Linux. U-Boot loads the kernel image into memory. Support file for building Linux image. Kernel image file generated by make menuconfig. 12

Appendix B List of Tables & Figures List of Figures Figure 2.1 USB Driver Flow... 4 Figure 2.2 Menuconfig Device Drivers... 5 Figure 2.3 Menuconfig USB Support... 6 Figure 2.4 Menuconfig FT313H Support... 6 Figure 2.5 Save Changes to Menuconfig... 7 13

Appendix C Revision History Document Title: Document Reference No.: FT_000862 Clearance No.: FTDI# 366 : http://www.ftdichip.com/products/ics/ft313h.html : Send Feedback Revision Changes Date 1.0 First Release 2013-11-01 14