Texas Instruments TUSB2136 User Manual

Texas Instruments TUSB2136 User Manual

Firmware debugging guide
Hide thumbs Also See for TUSB2136:

Advertisement

Quick Links

TUSB2136/ TUSB3210/
TUSB3410/ TUSB5052
Firmware Debugging Guide
User's Guide
May 2004
MSDS Bus Solutions
SLLU027A

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TUSB2136 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Texas Instruments TUSB2136

  • Page 1 TUSB2136/ TUSB3210/ TUSB3410/ TUSB5052 Firmware Debugging Guide User’s Guide May 2004 MSDS Bus Solutions SLLU027A...
  • Page 2 TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:...
  • Page 3 Preface Read This First About This Manual The TI USB device controllers TUSB2136, TUSB3210, TUSB3410, and TUSB5052 do not support in-circuit emulation (ICE) for debugging. However, there are alternative methods that can be used by the firmware developer to aid the coding process. This document describes these alternative methods.
  • Page 4 Contents Here is an example of a system prompt and a command that you might enter: C: csr −a /user/ti/simuboard/utilities In syntax descriptions, the instruction, command, or directive is in a bold typeface font and parameters are in an italic typeface. Portions of a syntax that are in bold should be entered as shown;...
  • Page 5 Trademarks Related Documentation From Texas Instruments TUSB2136 Universal Serial Bus Keyboard Hub Controller Data Manual, TI literature number SLLS442 TUSB3210 Universal Serial Bus General-Purpose Device Controller Data Manual, TI literature number SLLS466 Trademarks Hyperterminal is a trademark of Hilgraeve, Incorporated.
  • Page 7: Table Of Contents

    Contents Contents Introduction ..............Debug Strings .
  • Page 8 viii...
  • Page 9: Introduction

    Chapter 1 Introduction TI’s TUSB2136, TUSB3210, TUSB3410, and TUSB5052 are based on 8052 microcontroller cores, allowing the system designer much flexibility. There are many advantages to this. The 8052 is a common architecture, and therefore many programmers are already familiar with it. Also, many existing resources are available for the 8051/8052 architecture, including sample code.
  • Page 11: Debug Strings

    Chapter 2 Debug Strings A simple technique is to use the serial interface to output values and strings to the PC, which can help determine the status of the microcontroller unit (MCU) and internal memory. To use this technique, the unit under test must have a serial port interface that is attached to a terminal (such as a PC running the Windows...
  • Page 13: In-System Debugging Using Keil's Isd51 Feature

    Chapter 3 In System Debugging Using Keil's ISD51 Feature The ISD51 in-system debugger feature in Keil’s 8051 development tools provides a complete suite of debug functions for TUSBxxxx. This includes the following features: Single-step through the code Set breakpoints View/change CPU registers and memory Access the special function registers (SFRs) ISD51 is available in Keil’s C51 environment, version 6.23 and later.
  • Page 14: Operation

    Operation 3.1 Operation Use of ISD51 is straightforward. 1) Copy the ISD51.A51 and ISD51.H files, provided by Keil, to your project folder. 2) Add ISD51.A51 to the µVision2 project. 3) Add ISD51.H to the C module that contains the main C function. 4) Check the configuration settings in ISD51.H and modify them if necessary.
  • Page 15: Limitations

    Limitations 3.3 Limitations The ISD51 feature has a few limitations: Code banking is not supported. PDATA variables cannot be reviewed. Breakpoints and single-stepping do not work in interrupt service routines. Only part of the SFR can be changed in the ISD debugger; see ISD51.A51 for the details.
  • Page 17: File List

    Chapter 4 File List This chapter contains a source code listing for each C routine and header file used in TUSB2136/TUSB3210/TUSB3410/TUSB5052 firmware debugging. Topic Page C Source Code ..........
  • Page 18: C Source Code

    C Source Code 4.1 C Source Code 4.1.1 VOID rs232Initialization(VOID); Initialize the 8052 serial interface, including timer mode, baud rate, serial mode, and so on. VOID rs232Initialization(VOID) // take care of TMOD, SCON setting, because Timer 0&1 use // them together TMOD &= 0x0F;...
  • Page 19: Void Rs232Putstring(Char *Str)

    C Source Code 4.1.4 VOID rs232PutString(char *str); Send a string which is terminated by \0 to the 8052 serial interface. void rs232PutString(char *str) while(*str != ’\0’) rs232PutChar(*str++); 4.1.5 char rs232GetChar(void); Get one byte from the 8052 serial interface. char rs232GetChar(void) while(!RI);...
  • Page 20: Header Files

    Header Files 4.2 Header Files 4.2.1 RS232DBG.h #ifndef _RS232DBG_H_ #define _RS232DBG_H_ /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Include files +−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Function Prototype +−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ VOID rs232Initialization(VOID); VOID rs232PutChar(BYTE bData); /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Type Definition & Macro +−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ // replace follow as desire baud rate #define RS232_BAUD RATE BAUD4800_12000 /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Constant Definition...
  • Page 21: Types.h

    Header Files 4.2.2 Types.h #ifndef _TYPES_H_ #define _TYPES_H_ #ifdef __cplusplus extern ”C” #endif /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Include files +−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Function Prototype +−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ | Type Definition & Macro +−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ typedef char CHAR; typedef unsigned char UCHAR; typedef int INT; typedef unsigned int UINT;...

This manual is also suitable for:

Tusb3210Tusb3410Tusb5052

Table of Contents