#
# Copyright 2003 by Texas Instruments Incorporated.
# All rights reserved. Property of Texas Instruments Incorporated.
# Restricted rights to use, duplicate or disclose this code are
# granted through contract.
#
#
# "@(#) DDK 1.10.00.23 07-02-03 (ddk-b12)"
TITLE
-----
C5509_USB stress tests (sio_usbtest & gio_usbtest)
DOCUMENTATION
-------------
The documentation for this device driver is located in /ddk/docs/c5509_usb.pdf
USAGE
-----
These samples are tests for the USB device for the TMS320C5509 EVM board and uses the
c5509_usb mini-driver to transfer data between the EVM and a host PC. These tests are
used in conjunction with the host PC application "USBIO Demo Application" from
Thesycon and the setup program "usbio_ti.exe" is located in the /ddk/apps/usb/host
directory.
See the "NOTES - RUNNING THE SAMPLE APPLICATIONS" section below for
step-by-step instructions on running the sample applications.
DESCRIPTION
-----------
- sio_usbtest:
------------
This example demonstrates how an application can use the SIO API(asynchronous I/O)
to stream data to and from the host PC using the USB interface. The PC
host utility is configured to send a sample text file to the DSP via a USB OUT pipe
and the DSP echos back the data on another USB IN pipe.
This application is configured to use the DIO adapter.
- sio_usbtestl:
------------
This example is the same as the sio_usbtest example above except it uses the large
memory model.
- gio_usbtest:
------------
This example demonstrates how an application can use the GIO API(synchronous I/O)
to stream data to and from the host PC using the USB interface. Like the sio_usbtest,
the PC host utility is configured to send a sample text file to
the DSP via a USB OUT pipe and the DSP echos back the data on another USB IN pipe.
- gio_usbtestl:
------------
This example is the same as the sio_usbtest example above except it uses the large
memory model.
FILES
-----
(small memory model)
- gio_usbtest.cmd: application linker command file.
- gio_usbtest.pjt: project files to build the application gio_usbtest.
- gio_usbtestcfg.tcf: tconf configuration file. See notes below.
- gio_usbtest.tci: tconf configuration include file. See notes below.
- sio_usbtest.cmd: application linker command file.
- sio_usbtest.pjt: project files to build the application sio_usbtest.
- sio_usbtestcfg.tcf: tconf configuration file. See notes below.
- sio_usbtest.tci: tconf configuration include file. See notes below.
(large memory model)
- gio_usbtestl.cmd: application linker command file.
- gio_usbtestl.pjt: project files to build the application gio_usbtest.
- gio_usbtestlcfg.tcf: tconf configuration file. See notes below.
- gio_usbtestl.tci: tconf configuration include file. See notes below.
- sio_usbtestl.cmd: application linker command file.
- sio_usbtestl.pjt: project files to build the application sio_usbtest.
- sio_usbtestlcfg.tcf: tconf configuration file. See notes below.
- sio_usbtestl.tci: tconf configuration include file. See notes below.
- c5509evm_device.c: defines example USB device descriptor information
for the C5509 EVM.
- sio_usbtest.c implementation of sio_usbtest test.
- gio_usbtest.c implementation of gio_usbtest test.
- usbdscr_config.c: defines example USB configuration descriptors used by the
sio_usbtest and gio_usbtest applications requiring an USB IN and USB OUT BULK
transfer type endpoints.
- usbtest_params.c: USB default driver parameters.
- tconflocal.tci: tconf configuration include file. See notes below.
- readme.txt: this file.
NOTES
-----
GENERAL:
- These examples are not delivered with any CDB configuration files. This was
done to avoid customer versioning problems, since CDB versions must be matched
up with the DSP/BIOS product version. Instead, these applications have been
delivered with textual configuration files. You can generate your CDB files
by running the CCS tconf utility on the application's respective TCF file.
Alternatively, you can generate all of the DDK CDB files at once from the
batch file in the DDK's top level directory. See the product release notes for
more information on running this batch file. See the DSP/BIOS TextConf User's
Guide (SPRU007) for more information on the tconf utility.
- Files in the library are compiled with "no optimization switch" turned on,
and the same is specified in the project (pjt) files. If you plan to use this
module in a project release, you should rebuild the library with optimization
turned on.
- Each of the applications has a custom linker command file as part of the
its project. This linker command file links in the command
file that is generated by the DSP/BIOS Configuration Tool and also explicitly
links in the driver libraries.
RUNNING THE SAMPLE APPLICATIONS:
To run a sample applications described above, perform the following steps:
- If not already installed, install the host PC application "USBIO Demo Application"
from Thesycon by running the setup program called "usbio_ti.exe", located in
your /ddk/apps/usb/host directory, and follow the installation steps.
- Start the USBIO application called "usbioapp.exe".
From the Windows "Start" menu select "Start->Programs->Thesycon->USBIO
Drivers Package V1.51 (Light TI)->USBIO Application".
- From CCS load and run a DSP sample program (e.g. sio_usbtest55.out or gio_usbtest55.out)
-- First time only, Windows enumerates the USB bus and may ask you for the
directory location of the USBIO host driver. Browse to the "usbio_ti.sys" file
located in your Windows driver directory(e.g. C:\WINNT\system32\drivers) and
select "OK". Note: Make sure the 5509 EVM USB cable is also plugged into your PC.
- From the USBIO application, select the "output window" button in the down left
corner to display the output text window.
- Click on the Current Device "Open" button in the middle left to open the USB
device number 0. You should see some device information in the output window.
- Click the "Configuration" tab which is the third one at the top. Then click
the "Set Configuration" button. The "Conf Desc Index" value should be 0. If an
error is displayed in the output window, make sure you have loaded and run one of
the example DSP programs and the USB cable is connected.
- Click the "Pipes" tab which is the 5th at the top.
-- In the "Endpoint Address", input the value 0x82, which is the endpoint
that will be used by the host to read data from the device.
-- In "purpose", select "Read Pipe to output window". Press "Open Pipe" and
a new window will appear. Note: you can also select the "Read from Pipe to
File" for the "Purpose" in order to save the echo'd data to a file, but the
data will not be displayed in the output window.
-- In this new window, select the "Read from Pipe to output window" tab, then
you can simply click the "start reading" button. Do not close this new window; keep
it open or the USB pipe will close.
-- In the "Endpoint Address", input 0x02, which is the endpoint that will be
used by the host to send data to the device.
-- In "Purpose", select "Write from File to Pipe". Select "Open Pipe" and a
new window will appear.
-- In the new window, select the "Browse" button and select the file you
wish to write to the device. For example, a text file such as the gio_usbtest.c or
sio_usbtest.c works well.
-- Uncheck the "rewind" box so that the data file is sent only once. You may wish
to keep the "rewind" box selected if you want the file to be sent continuously.
-- Click the "start writing" button. The data should now be sent to the output
window (or file if select). You can select the "Start Writing" button again if you
want to write the same file again.
- Compare the file written with the data in
评论1