Title: Group 1 Project 8 USB Controller
1Group 1 Project 8USB Controller
- Advisor - Dr. Nutter
- Team Members - Chris Beihl, James Crawford
2Outline
CB
- Project Objectives
- TUSB3410 Background
- Overview
- Internals
- TI Boot Code Flowchart
- TUSB Memory Map
- Configuring On-Board EEPROM
- TI Firmware Header Generator
- Components of Header
- VID/PID
- Serial
- Firmware
- Results
3Outline Contd
CB
- Debugging the TUSB3410 2nd UART
- Setting up a 2nd UART
- Utilizing GPIO pins
- Level-shifting hardware
- Testing 2nd UART
- Roadblock to Debugging
- Results
- Migrating TI firmware to IAR version 6
- TI Firmware as delivered
- Obtaining Version 5
- Transitioning to Version 6
- Results
- Gantt Chart
- Budget
- References
- Questions
4Project Goal
CB
- Using the TUSB3410, we will allow an MSP430 to
communicate with a host computer via USB using
MIDI standards for use in the ProPlayTM MIDI
keyboard
5Project Objectives
CB
- Implement the tools to develop, implement and
debug code for the TUSB3410 - Obtain EEPROM to customize TUSB3410
- Allows unique enumeration of each device
- Allows running custom firmware w/o downloading
firmware from the host - Setting up a development environment for source
level debugging - Setup and Test 2nd UART and level shifting
hardware for this purpose
6Why do we want to make our UART device USB
compatible?
JC
- The ProPlay Keyboard is going to be utilized as a
band style instrument - We want to be able to use several at once
- MIDI compliant devices, means we can have up to
16 at a time on one computer - They need to be able to communicate with each
other as well - When the master board signals a key change, all
connected boards change as well - One Term Plug and Play
- Idiot proof
7TUSB3410 Background
JC
8TUSB3410 Overview
JC
- Quickly convert an RS-232 product to USB
- Jump start development or use as a complete
USB-to-RS-232 converter - Firmware, VCP drivers, and schematics provided
- Quick connect to a USB-enabled host
- No Power Supply required - the EVM gets power via
the included USB cable.
Referenced from www.ti.com
9TUSB3410 Internals
JC
- Uses Mentor Graphics 8052 core
- Software compatible w/ Intel 8052
- Need to setup 3 of the GPIO pins
- UART Input / Output
- Output ready flag
10TUSB3410 Memory Map
JC
- 2 separate address spaces
- CODE (read-only)
- XDATA (read-write)
- After loading firmware from EEPROM, the bootcode
switches the SDW bit to remap the code just
loaded in RAM to CODE space and jumps to 0000h to
execute firmware
11Configuring the On-Board EEPROM
JC
12Configuring EEPROM header w/ TI Header Generator
JC
13Converting from Intel standard format output to
binary
JC
14Writing / Verifying EEPROM
JC
15EEPROM
JC
- In order to use the EEPROM device, it has to be
programmed with a TI header - This header contains information including
- Vendor ID
- Product ID
- Serial Number
- Firmware availability
- PID/VID is vital to prevent BSOD
- W/ TUSB4310 a Serial Number is also vital to
prevent com port hopping in Windows when using
Driver/Firmware solution - Ensures that the Serialized device is always
assigned to the same com port
JC
16TI Boot Code Flowchart
JC
Search for product signature on EEPROM
yes
Load descriptor info from EEPROM
Valid signature?
no
Load firmware from EEPROM and start executing
yes
Firmware present?
Load default descriptor info
no
EEPROM Socket
Download firmware from USB, enumerate, start
executing firmware
17Results
JC
- Header was successfully programmed onto EEPROM
- Enumeration was successful
- Device renamed
- Device Serialized
- Firmware Can be run from the EEPROM
18Debugging the TUSB3410
JC
19Setting up the 2nd UART
JC
- Original intent was to utilize a 2nd UART for
source level debugging - Setup 3 GPIO pins, Send, Receive and output ready
flag - Introduce Level-shifting hardware
- Test the Hardware
20Debugging Environment Hardware Setup
JC
ProPlay MIDI device
Host Computer
MSP- 430
TUSB3410
Host USB
Level- Shifting Hardware
Host UART
21Experimental setup
JC
Host Computer
TUSB3410
Host USB
Level- Shifting Hardware
Host UART
22Sipex RS-232 Level-shifter
JC
23The Test Setup
JC
24Test 1, its all Greek to us
JC
ASCII a 0110 0001
ASCII f 0110 0110
Output
Input
25Test 1 Hyper Terminal output
JC
26Test 1 broken down
JC
- The MSB was consistently incorrect, being a 1
instead of a 0 - Resulted in a character 8 places up on the ASCII
chart being output from the UART - ß instead of a for example
27The problem
CB
- The 3410 operates at 24 MHz, which is twice the
standard oscillator freq. of 12 MHz - TH1 is the overflow value in timer one, which has
to be adjusted for each baud rate - When we wanted to transmit at 2400baud, we
thought we could take the 1200 baud value from
the table since fosc is twice the standard
(unfortunately fosc11.059 MHz in the table)
28The solution
CB
- Solve for the correct value of TH1
29Test 2, English is way better
CB
- We input an ASCII a
- And the output echo from the UART was identical!
30Test two hyper terminal
CB
31Roadblock to Debugging
CB
- In order to step through code for source-level
debugging, the device must be able to write to
code space at runtime - Intel 8051 cant write to code space at runtime
- NoICE debugger recommends using a EEPROM, and
hooking it up to both code space and external
data space (xdata) - We cant do this because port 0 and port 2 are
not accessible on the TUSB3410
32Migrating Firmware to IAR Embedded Workbench
version 6
CB
33TI Firmware as delivered
CB
- Developed by Real Chips using IAR Embedded
Workbench version 5 - Obtained through a NDA (non-disclosure agreement)
34Obtaining version 5
CB
35Transitioning to version 6
CB
- Version 6 has a complete rewrite of the C
compiler - None of the language extensions are compatible
- In theory we can take out all the language
extensions and compile the firmware on the new
version
36Results
CB
- Compiled all of the source files without any
errors - Linker problems
- The real time kernel (written in assembly) has
external references to global variables in the C
code - The global variables are in 16-bit address space
instead of 8-bit (idata) like they should be
37Linker Problems
CB
38Gantt Chart
CB
39Gantt Chart
CB
40Budget
CB
41References
CB
- USB 2.0 Specificationswww.usb.org
- TI TUSB3410 Data Manualwww.ti.com
- TI TUSB3410 EVM Data Sheetwww.ti.com
- Xeltek Super Pro Z page
- www.xeltek.com
42Questions?
CB