The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Scott Tater ABSTRACT TMS320VC5402 bootloader allows system designer fl


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



Bootloading TMS320VC5402 Mode
Scott Tater ABSTRACT TMS320VC5402 bootloader allows system designer flexibility memory configuration providing many methods boot processor reset. commonly used boot procedure allows host microprocessor load code into TMS320VC5402 using Host Port Interface (HPI) peripheral. This application report describes boot method provides example using TMS320VC5402 Starter (DSK). While this application report specifically addresses TMS320VC5402 bootloader, much information applicable other members TMS320C54xDSP generation. Contents Introduction C5402 Bootloader C5402 Boot Process.2 C5402 Starter Kit.3 Software Process Boot Mode.4 Generate Output (.out) COFF File.4 Parse .out File Extract Destination Information Code.4 Write Parsed Code C5402 Load On-Chip Memory Write Entry Point Memory Location 0x007F C5402 Example: Boot Using Blink Demo.5 References.6 Appendix Code Listing.7 Figures Figure Excerpt From Extraction Output (blink.out.c) Applications Semiconductor Group
Introduction
This section describes TMS320VC5402 (hereafter referred C5402) bootloader gives overview steps involved performing bootload operation through Host Port Interface (HPI). also briefly describes C5402 Starter (DSK) functionality, which will used demonstration platform.
TMS320C54x trademark Texas Instruments. Other trademarks property their respective owners.
SPRA382 C5402 Bootloader
C5402 bootloader used transfer code from external source into either internal external memory. bootloader allows user flexibility system design storing code cost-efficient, nonvolatile external memory. This enables designer avoid custom on-chip mask reduce system cost. bootloader flexible program that supports multiple boot methods code sources. addition multiple types parallel serial boot modes, possible host microprocessor download code bootload C5402 using HPI. This document describes boot presents method successfully boot C5402 using HPI. complete discussion bootload modes C5402 contents, TMS320VC5402 TMS320UC5402 Bootloader application report (literature number SPRA618).
C5402 Boot Process
C5402 contains words on-chip ROM. portion this used store bootloader code. Processor Mode Status (PMST) register sampled reset value partially determines configuration C5402 memory map. (MP/ then C5402 microcomputer mode bootloader will start execution following reset. ROM-coded bootloader located program memory address 0xF800. complete description C5402 reset process, memory map, control registers, TMS320C54x Reference Set, Volume Peripherals (literature number SPRU131). C5402 executes bootloader after left reset, unlike some members TMS320C5000DSP platform. execution, bootloader begins polling different resources determine which boot mode active. bootloader uses various control signals including interrupt signal, pins, data on-chip memory configure control boot process. boot mode found active, bootloader will cycle continuously, checking each mode turn until selected. There methods signal bootloader that boot active: interrupt data memory location 0x007F. bootloader checks interrupt (INT2) flag Interrupt Flag Register (IFR) (active). active, then mode selected. bootloader also clears location 0x007F uses software flag show that boot completed. boot mode also selected without using INT2 completing code-transfer process writing location 0x007F signal that boot completed.
TMS320C5000 trademark Texas Instruments.
Bootloading TMS320VC5402 Mode
SPRA382
signal used activate boot mode, there methods obtain input pulse pin: Host Interrupt HINT directly Generate valid interrupt signal within clock cycles from when C5402 fetches reset vector
Note that HINT generates valid interrupt signal start bootload process. host processor uses port send program code C5402 during boot. When host finished, writes code entry point location 0x007F. bootloader will recognize this change, branch execution entry point, terminate, leaving transferred code control.
C5402 Starter
This section presents code that been tested C5402 Starter (DSK) from Texas Instruments (TI). platform that useful prototyping code actual hardware. contains C5402 DSP, SRAM Flash memory, number external interfaces. detailed description DSK, website www.ti.com. Note that eight switches hardware configuration. following settings required prepare booting described this application report: Ensure that connected host using parallel port interface Select C5402 microcomputer mode setting low. Using switch unit, switch down) position. (Optional) Enable debug connecting JTAG emulator (such XDS510TM) 14-pin JTAG header DSK. Then, configure parallel port interface allow emulation connection through JTAG header. Using switch unit, switch position. Code Composer Studio(CCS) integrated development environment (IDE) then used monitor boot process. Note: sure that specific board configuration file loaded Code Composer Studio setup does load General Extension Language (GEL) file that alters these configuration settings (especially bit). Code Composer Studio User's Guide (literature number SPRU328) complete details.
XDS510 Code Composer Studio trademarks Texas Instruments.
Bootloading TMS320VC5402 Mode
SPRA382
Software Process Boot Mode
Complete these four steps execute C5402 bootload operation: Generate output (.out) Common Object File Format (COFF) file Parse .out file extract destination information code Write parsed code C5402 load on-chip memory Write entry point memory location 0x007F C5402
This application report associated archive that downloaded from same location this document. archive contains files that mentioned given examples.
Generate Output (.out) COFF File
bootloading process starts with executable object (.out) file produced using Code Composer Studio. .out file generated from desired user source code code that will loaded onto C5402 during boot process.
Parse .out File Extract Destination Information Code
.out file generated first step follows Common Object File Format (COFF). COFF implementation AT&TCOFF format. modular format that allows user flexibility managing code segments target system memory. complete COFF file format described TMS320C54x Assembly Language Tools User's Guide (literature number SPRU102). Because COFF file modular, cannot loaded directly into C5402 memory. That .out file exact memory image. must first parse COFF file reconstruct image. method this described Extracting Equivalent Values From COFF File application report (literature number SPRA573). Extracting Equivalent Values provides example source produce text listing that contains destination address, data length, data from each section COFF file.
Write Parsed Code C5402 Load On-Chip Memory
Using parsed text listing produced step (see Section possible transmit this data C5402 memory. This will start actual boot process. best procedure will vary specific implementation since each host processor will vary interface C5402 HPI. Regardless implementation, host processor will need perform operations order complete this step boot: read listing file transmit C5402.
AT&T registered trademark AT&T Corporation.
Bootloading TMS320VC5402 Mode
SPRA382
Note: This application report includes example code that uses C5402 host-side library, evmdsk54dll.lib. library contains communication routines that allow host access through parallel port connection. Complete library documentation available Code Composer Studio help file library include file, evmdsk54dll.h. Appendix shows listing this example, hpi-boot.cpp. executable this code available website along with this application report. This program shows read listing file, initialize DSK, transmit program code using evmdsk54dll libraries.
Write Entry Point Memory Location 0x007F C5402
After memory C5402 been initialized, last step boot process write program entry point memory location 0x007F. C5402 bootloader will detect change, branch indicated value, start program execution. boot done C5402 will normally. entry point obtained from memory (.map) file produced during linking stage .out file generation.
Example: Boot Using Blink Demo
following techniques used boot C5402 using port with code example demo. This example uses C5402 requires that configured described Section this document. also requires Code Composer Studio version 1.20 greater. example files referenced this section found archive associated with this application report. They downloaded from Texas Instruments site same location this application report. archive contains: boot code VC++ project format Blink demo subdirectory \blink COFF Extraction Utility subdirectory \hpi-boot
programs this example subdirectory hpi-boot associated archive. Using COFF extraction utility, coff_both, parse blink.out produce text listing. command line, type: "coff_both -out blink.out" Coff_both will prompt COFF type. Enter because both Code Composer Studio versions 1.20 produce type COFF files. generated file will contain listing entitled "blink.out.c". excerpt from contents shown Figure
Bootloading TMS320VC5402 Mode
SPRA382
Section .vers src_addr length 0x39 (57) dest_addr space 0x0046, 0x004D, 0x0031, 0x0039, 0x003A, 0x0032, 0x0000, 0x006E, 0x0069, 0x0063, 0x0040, 0x002A, 0x0067, 0x002D, 0x0000, checksum 0x0072, 0x0061, 0x0032, 0x003A, 0x0032, 0x0030, 0x0062, 0x006B, 0x006F, 0x0064, 0x0028, 0x002A, 0x006C, 0x0064, 0x0069, 0x0079, 0x0020, 0x0032, 0x0031, 0x0030, 0x006C, 0x005F, 0x0073, 0x0062, 0x0023, 0x002A, 0x0075, 0x0030, 0x0020, 0x0020, 0x0030, 0x0034, 0x0020, 0x0030, 0x0069, 0x0062, 0x002E, 0x0000, 0x0029, 0x0020, 0x0065, 0x0039,
Figure
Excerpt From Extraction Output (blink.out.c)
Next, host-side bootloader code, hpi-boot, read extracted file write information DSK. Source code this program presented Appendix command line, type: "hpi-boot blink_bios.out.c" Note that bootloader code with entry point Blink demo. Other programs require change this code order different entry point. Entry point information best obtained from .map file produced during Code Composer Studio linking stage. This completes boot process. Status information will also displayed while program running. Verify that boot successful observing blinking LEDs DSK.
References
TMS320C54x Reference Set, Volume Peripherals (literature number SPRU131) Extracting Equivalent Values From COFF File application report (literature number SPRA573) TMS320C54x Assembly Language Tools User's Guide (literature number SPRU102) TMS320VC5402 TMS320UC5402 Bootloader application report (literature number SPRA618) Code Composer Studio User's Guide (literature number SPRU328) TMS320VC5402 Fixed-Point Digital Signal Processor data sheet (literature number SPRS079)
Bootloading TMS320VC5402 Mode
SPRA382
Appendix Code Listing
hpi-boot.cpp FILENAME. hpi-boot.cpp DATE CREATED. 01/21/2002 LAST MODIFIED. XXXX This program demonstrates method boot load 'C5402 using Host Port Interface (HPI). 'C5402 Starter (DSK) used reference platform. parsed COFF file read into memory transmitted 'C5402 through port. Host side libraries include files have default root directory (CCS v2.0): \ti\c5400\dsk5402\host Entry Point hard wired this code. beneficial user change this feature. Blink Demo 0x500. #include "stdafx.h" //Globals HANDLE //DSK Handle LPVOID //HPI Handle EVMDSK54X_BOARD_TYPE boardType TYPE_C5402_DSK; EVMDSK54X_OPEN_TYPE openType EVMDSK54X_PARALLEL_OPEN; USHORT port 0x378; parallel port address
DSK_init(); DSK_close(); main(int argc, char* argv[]) FILE *fp; char line[80]; char tokA[20], tokB[20], tokD[20]; //strings used tokenize input length, destaddr; short data[20000]; //Buffer used hold data sections. Increase large code short prog_entry=0x0500; default entry point i,flag,eof_flag;
(argc //error printf ("Correct Syntax: hpi-boot FILENAME\n"); printf ("where FILENAME parsed COFF file\n"); exit(1); else ((fp fopen(argv[1], "r")) NULL) printf ("File could opened reading\n");
(DSK_init()) //Initialize DSK-open DSK, port, configure exit(-1);
Bootloading TMS320VC5402 Mode
SPRA382
eof_flag=0; //shows sections reached //This section scans data section //The section read into memory then //When there more sections read, //writen stop boot process while (!eof_flag){ while ((fscanf(fp, "%s", tokA) EOF) 0)); (!flag) parsed file. written entry point
(flag =(strncmp(tokA, "Section",
fgets(line, sizeof(line), fp); //read addr line fgets(line, sizeof(line), fp); //read length line fscanf(fp, %s", tokA, tokB, &length, tokD); fscanf(fp, %s", tokA, tokB, &destaddr, tokD); //read dest addr
fgets(line, sizeof(line), fp); //read addr line fgets(line, sizeof(line), fp); //read blank line
(i=0; length; i++){ //reads records data values fscanf(fp, "%x,", &data[i]) write single program section 'C5402 printf("\n** Writing data section boot\n"); printf("Section Length: %#x\n", length); printf("Destination Address: %#x\n\n", destaddr); (!evmdsk54x_hpi_write(hm, (PULONG) data, (PULONG) &length, (ULONG)destaddr, PROG_MEMORY, printf(" failed"); return (-1); else eof_flag write prog start address data 0x007F printf("** Writing program entry point complete boot\n"); printf("Entry point: written location 0x007f\n", prog_entry); (PULONG) &prog_entry, (ULONG) 0x7F, DATA_MEMORY, printf(" failed"); return (-1); booting printf("\nClosing.\n\n"); (DSK_close()) exit (-1); standard initialization 5402 access
Bootloading TMS320VC5402 Mode
SPRA382
return
DSK_init() Standard initialization 5402 access booting
open communication port with parallel port interface printf ("\n** Initializing communication channel"); ((hd evmdsk54x_open(port, boardType, openType, INVALID_HANDLE_VALUE) printf ("!! Error:\n"); printf ("evmdsk54x_open failed"); return (-1); open communication port with printf ("\n** Opening HPI"); (!(hm evmdsk54x_hpi_open(hd))) printf ("!! Error:\n"); printf ("evmdsk54x_hpi_open failed"); return (-1); hold reset printf("\n** Resetting DSP"); (!evmdsk54x_reset_dsp(hd, (ULONG)0x00)) printf ("!! Error:\n"); printf ("evmdsk54x_reset_dsp failed"); return (-1); take reset printf("\n** Taking reset"); (!evmdsk54x_unreset_dsp(hd, (ULONG) 0x00)) printf ("!! Error:\n"); printf ("evmdsk54x_unreset_dsp failed"); return (-1); disable board flash access ensure memory access will affect on-board flash printf("\n** Disabling FLASH access"); (!evmdsk54x_flash_access(hd, FALSE)) printf ("!! Error:\n"); printf ("evmdsk54x_flash_access failed"); return (-1); printf("\n** Init Passed\n\n"); return
DSK_close()
Bootloading TMS320VC5402 Mode
SPRA382
close communication port printf ("** Closing HPI\n"); (!evmdsk54x_hpi_close(hm)) printf ("!! Error:\n"); printf ("evmdsk54x_hpi_close failed\n"); return(-1); close communicaiton port printf ("** Closing communication channel\n"); (!evmdsk54x_close(hd)) printf ("!! Error:\n"); printf ("evmdsk54x_close failed\n"); return(-1); return(0);
Bootloading TMS320VC5402 Mode
IMPORTANT NOTICE Texas Instruments Incorporated subsidiaries (TI) reserve right make corrections, modifications, enhancements, improvements, other changes products services time discontinue product service without notice. Customers should obtain latest relevant information before placing orders should verify that such information current complete. products sold subject TI's terms conditions sale supplied time order acknowledgment. warrants performance hardware products specifications applicable time sale accordance with TI's standard warranty. Testing other quality control techniques used extent deems necessary support this warranty. Except where mandated government requirements, testing parameters each product necessarily performed. assumes liability applications assistance customer product design. Customers responsible their products applications using components. minimize risks associated with customer products applications, customers should provide adequate design operating safeguards. does warrant represent that license, either express implied, granted under patent right, copyright, mask work right, other intellectual property right relating combination, machine, process which products services used. Information published regarding third-party products services does constitute license from such products services warranty endorsement thereof. such information require license from third party under patents other intellectual property third party, license from under patents other intellectual property Reproduction information data books data sheets permissible only reproduction without alteration accompanied associated warranties, conditions, limitations, notices. Reproduction this information with alteration unfair deceptive business practice. responsible liable such altered documentation. Resale products services with statements different from beyond parameters stated that product service voids express implied warranties associated product service unfair deceptive business practice. responsible liable such statements.
Mailing Address: Texas Instruments Post Office 655303 Dallas, Texas 75265
Copyright 2002, Texas Instruments Incorporated

Other recent searches


NJU8752 - NJU8752   NJU8752 Datasheet
MSC8101 - MSC8101   MSC8101 Datasheet
MSC8102 - MSC8102   MSC8102 Datasheet
KK74LS06 - KK74LS06   KK74LS06 Datasheet
KK74LS06N - KK74LS06N   KK74LS06N Datasheet
KK74LS06D - KK74LS06D   KK74LS06D Datasheet
KK74HC30A - KK74HC30A   KK74HC30A Datasheet
KAA-0760 - KAA-0760   KAA-0760 Datasheet
HSMP-386D - HSMP-386D   HSMP-386D Datasheet
CMV1020 - CMV1020   CMV1020 Datasheet
AT89S51 - AT89S51   AT89S51 Datasheet
AT89S52 - AT89S52   AT89S52 Datasheet
AT89S51 - AT89S51   AT89S51 Datasheet
AT89S52 - AT89S52   AT89S52 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive