NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

CLP USB Host

From Texas Instruments Wiki
Jump to: navigation, search




LaunchPad Resource Portal  LaunchPadRocket.png


This wiki is open and can be edited by all!

More information available @ www.ti.com/launchpad


LaunchPad Banner.jpg

Introduction[edit]

The EK-TM4C1294XL Connected LaunchPad is the first TI LaunchPad to be designed and built to be ready to act as a USB host out of the box. Example programs are provided in the TivaWare package. This tutorial will explore the usb_host_msc example from TivaWare for this kit. Most of this information will apply to other usb_host_ examples.

Prerequisites[edit]

  1. We assume you have downloaded TivaWare and can load example projects on to your EK-TM4C1294XL.
  2. We assume you have a computer with a serial terminal application to connect to the debug virtual serial port on the EK-TM4C1294XL
  3. We assume you have the USB Micro B cable that came with the EK-TM4C1294XL (or an equivalent cable). This will power the board and provide a user interface for the example application.

You need the following items which are not included in the kit:

USB Flash Drive

ITEM ONE

A USB Flash Drive such as this. We test with a wide variety of flash drives. Just about all of them work. When we find one that does not work we do our best to modify TivaWare USB Library to make it work.

Yoda is completely optional.

USB A female to micro A male.

ITEM TWO

A USB adapter cable. Micro A male on one end and full size A female on the other end. These are included in many of the USB host capable kits from the Stellaris/Tiva team or from the following sources.

Connect the kit and cables[edit]

Connect the cables and USB stick as shown

Connect the USB micro A to A receptacle adapter cable to the left side of the EK-TM4C1294XL. Connect the micro B cable into the left side of the EK-TM4C1294XL and then to your computer.

Make sure the power select jumper is set to ICDI.

Download the usb_host_msc application example[edit]

LM FLash Programmer and TivaWare usage to load usb_host_msc application

In the TivaWare Install directory (Usually C:\TI\TivaWare_C_Series-<version>\) find examples/boards/ek-tm4c1294xl/usb_host_msc/ In this directory is the example USB Host Mass Storage Controller application. The binary is found in the sub-directory for each tool chain.

Use [LM Flash Programmer] to load one of the pre-built binaries onto your board.

  • Select TM4C1294XL LaunchPad from the QuickSet drop down in LM Flash Programmer.
  • On the program tab navigate to and open the binary file usb_host_msc.bin from the tool chain of your choice.
  • Erase Entire Flash, Verify After Program and Reset MCU After Program options are suggested. Address offset for this application is 0x0.
  • Click the Program Button.

Connect to the UART Terminal[edit]

Connect to the debug virtual serial port from the Connected LaunchPad with the terminal program of your choice. This tutorial will use Tera Term.

UART settings are 115200 8N1.

  • You will see a command prompt on the UART terminal. It will notify you when a device is plugged and unplugged.
  • Type help for a list of available commands.
  • Install the USB stick in to the USB A receptacle. The UART terminal will receive a notification that device is connected.
  • Use the ls, cd, and cat commands to explore the contents of the flash drive.

Explore the source code[edit]

The next step is to explore the usb_host_msc source code. To do this import the project into your tool chain of choice.

We use the FATfs file system to read and write files to the mass storage device. You can use this code as a basis for your application. Perhaps logging large amounts of data to the USB stick as it is collected from a BoosterPack. Have fun and be creative. The example code is just a foundation upon which you can build.

Discover other USB Host applications[edit]

The TivaWare installer comes with other USB Host example applications. Currently (as of TivaWare 2.1) for the EK-TM4C1294XL we have usb_host_msc (for Mass Storage Controllers), usb_host_keyboard and usb_host_mouse.

Additional USB Host applications are available for other boards in the TivaWare installer such as the DK-TM4C129X kit. Applications designed for other kits will require some porting to run on the EK-TM4C1294XL.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CLP USB Host here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CLP USB Host here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article CLP USB Host here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article CLP USB Host here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article CLP USB Host here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CLP USB Host here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CLP USB Host here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article CLP USB Host here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article CLP USB Host here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity