Texas Instruments | Host USB Support on the DVEVM | Application notes | Texas Instruments Host USB Support on the DVEVM Application notes

Texas Instruments Host USB Support on the DVEVM Application notes
Application Report
SPRAAP8 – July 2007
Host USB Support on DVEVM
Juan Gonzales .................................................................................................................................
ABSTRACT
The TMS320DM6446 device can be configured as a universal serial bus (USB) host or
slave device. When configured as a host, it can support USB mass storage devices
such as USB flash drives which are widely used today to transfer pictures, music, and
documents between PCs, laptops, and portable devices; however, this support is not
enabled by default. This document outlines the necessary steps for enabling the host
USB support for mass storage devices on the digital video evaluation module
(DVEVM).
1
2
3
Contents
Building the Linux® Kernel With Host USB Mass Storage Support .......................... 1
Mounting USB Flash Key Drive ................................................................... 3
References .......................................................................................... 5
List of Figures
1
2
3
1
Xconfig Utility Showing How to Enable USB Host Mass Storage Support.................. 2
Xconfig Utility Showing How to Enable SCSI Disk Support ................................... 3
Tera Term Capture Showing How to Load Linux Kernel via TFTP .......................... 4
Building the Linux® Kernel With Host USB Mass Storage Support
The USB mass storage devices are the most common type of USB devices on the market. This section
assumes that you are familiar with the DVEVM Software Setup section from the DVEVM Getting Started
Guide (SPRUE66) that is included in the DVEVM kit. The DVEVM Software Setup section demonstrates
the process of building a Linux kernel. This section uses the same directory structure defined in that
document. The following steps demonstrate enabling support for host USB mass storage devices, such as
USB flash-drives, on DVEVM.
1. Go to the directory where the Linux Support Package (LSP) is found, on the host Linux workstation.
host $ cd /home/user/workdir/lsp/ti-davinci
2. Bring up Linux kernel configuration utility.
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- xconfig
Linux is a registered trademark of Linux Torvalds in the U.S. and other countries.
SPRAAP8 – July 2007
Submit Documentation Feedback
Host USB Support on DVEVM
1
www.ti.com
Building the Linux® Kernel With Host USB Mass Storage Support
3. Go to Device Drivers → USB support, check (as opposed to ‘*’, or ‘M’) the USB Mass Storage support
box.
Figure 1. Xconfig Utility Showing How to Enable USB Host Mass Storage Support
2
Host USB Support on DVEVM
SPRAAP8 – July 2007
Submit Documentation Feedback
www.ti.com
Mounting USB Flash Key Drive
4. Go to Device Drivers → SCSI device support, check the SCSI disk support box
Figure 2. Xconfig Utility Showing How to Enable SCSI Disk Support
5. Save the settings and exit the xconfig application.
6. If you are not already logged in as user, log in as user prior to building the Linux kernel in the next step
(similar to the steps in the DVEVM Getting Started Guide (SPRUE66)).
host $ su user
7. Perform a make clean.
host $ make clean
8. Build the Linux kernel.
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
You now have a Linux kernel that supports USB host mass storage.
2
Mounting USB Flash Key Drive
The steps in Section 1 must be completed before you continue.
1. Log in as user on the host machine, copy the Linux kernel image with USB support to the TFTP
directory and change the permissions to the image file.
host $ cp ~/workdir/lsp/ti_davinci/arch/arm/boot/uImage /tftpboot
host $ chmod a+r /tftpboot/uImage
SPRAAP8 – July 2007
Submit Documentation Feedback
Host USB Support on DVEVM
3
www.ti.com
Mounting USB Flash Key Drive
2. Configure the u-boot parameters so the DVEVM uses the TFTP to load the Linux kernel from the host
machine and NFS mounts file system from the host machine as shown in Figure 3. Note that all the
remaining steps in this section take place on the terminal applications window as opposed to the host
workstation. With the terminal application running, power on the DVEVM and press any key on your
terminal window to stop the u-boot’s autoboot sequence. At the u-boot prompt, type the following
commands:
Note:
Replace 00:0E:99:02:51:F4 with the MAC address found on your DVEVM board and all
instances of 192.168.1.103 with the IP address on your host workstation.
EVM # setenv ethaddr 00:0E:99:02:51:F4
EVM # setenv serverip 192.168.1.103
EVM # setenv ipaddr dhcp
EVM # setenv bootfile uImage
EVM # setenv bootcmd ‘dhcp;bootm’
EVM # setenv bootargs ‘console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs
nfsroot=192.168.1.103:/home/user/workdir/filesys,nolock mem=120M’
EVM # saveenv
Figure 3. Tera Term Capture Showing How to Load Linux Kernel via TFTP
3. Turn off the DVEVM and make sure J7 jumper is set in position 2-3; this puts the DVEVM in the USB
host mode (factory default is position 1-2).
4. Power on the DVEVM, and log in as root on your terminal window. The DVEVM should be running the
Linux kernel with USB support from the host workstation’s /tftpboot directory.
4
Host USB Support on DVEVM
SPRAAP8 – July 2007
Submit Documentation Feedback
www.ti.com
References
5. Make a mount point for the USB flash key. The mount can be located anywhere you want, but a
common convention is to place this under the ‘/mnt’ directory.
$ mkdir /mnt/flashkey
Note:
This step only needs to be done once.
6. Insert a FAT or FAT32 formatted USB flash key into the DVEVM; you may seem some log messages
indicating the USB flash key was detected.
7. Mount the flash key.
$ mount –t vfat /dev/sda1 /mnt/flashkey
8. Once the flash key is mounted, you can access it like any other file system; for example, to play a
video file stored in the flash key using the decode demo, simply type:
$ cd /opt/dvevm
$./decode –v /mnt/flashkey/example-video.m2v
3
References
•
DVEVM Getting Started Guide (SPRUE66)
SPRAAP8 – July 2007
Submit Documentation Feedback
Host USB Support on DVEVM
5
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements,
improvements, and other changes to its products and services at any time and to discontinue any product or service without notice.
Customers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s
standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this
warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily
performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and
applications using TI components. To minimize the risks associated with customer products and applications, customers should
provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask
work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services
are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such
products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under
the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is
accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an
unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Information of third parties
may be subject to additional restrictions.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service
voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business
practice. TI is not responsible or liable for any such statements.
TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would
reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement
specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications
of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related
requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any
applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its
representatives against any damages arising out of the use of TI products in such safety-critical applications.
TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is
solely at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in
connection with such use.
TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products
are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any
non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements.
Following are URLs where you can obtain information on other Texas Instruments products and application solutions:
Products
Applications
Amplifiers
amplifier.ti.com
Audio
www.ti.com/audio
Data Converters
dataconverter.ti.com
Automotive
www.ti.com/automotive
DSP
dsp.ti.com
Broadband
www.ti.com/broadband
Interface
interface.ti.com
Digital Control
www.ti.com/digitalcontrol
Logic
logic.ti.com
Military
www.ti.com/military
Power Mgmt
power.ti.com
Optical Networking
www.ti.com/opticalnetwork
Microcontrollers
microcontroller.ti.com
Security
www.ti.com/security
RFID
www.ti-rfid.com
Telephony
www.ti.com/telephony
Low Power
Wireless
www.ti.com/lpw
Video & Imaging
www.ti.com/video
Wireless
www.ti.com/wireless
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2007, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising