Texas Instruments TMS320C3 Series Скачать руководство пользователя страница 154

B-14

 

Содержание TMS320C3 Series

Страница 1: ...TMS320C3x DSP Starter Kit User s Guide...

Страница 2: ...UCTS ARE NOT DESIGNED INTENDED AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE SUPPORT APPLICATIONS DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS Inclusion of TI products in such applicatio...

Страница 3: ...installation instructions for your assembler and de bugger It lists the hardware and software tools you ll need to use the DSK and tells you how to set up its environment J Chapter 3 lists the key fe...

Страница 4: ...e system displays such as prompts command output error messages etc Here is a sample program listing of a bit file generated by the accumulator 0x00809800 directive word 1 2 3 0x00809800 0x00000001 wo...

Страница 5: ...use an op tional parameter you specify the information within the brackets you don t enter the brackets themselves Here s an example of a directive that has an optional parameter entry value The entr...

Страница 6: ...re number SPRU035 describes the assembly language tools as sembler linker and other tools used to develop assembly language code assembler directives macros common object file format and symbolic debu...

Страница 7: ...13 274 2324 33 1 3070 1032 4389750 mcimail com http www ti com dsps 713 274 2323 8 N 1 44 2 3422 3248 ftp ti com mirrors tms320bbs 192 94 94 53 Ask questions about micro controller product operation o...

Страница 8: ...Business Machines Corp IBM PC and PC DOS are trademarks of International Business Machines Corp MS DOS is a registered trademark of Microsoft Corporation Windows is a trademark of Microsoft Corporatio...

Страница 9: ...DSK Software 2 5 2 4 Step 3 Modifying Your config sys File 2 5 2 5 Step 4 Modifying the PATH Statement 2 6 2 6 Step 5 Verifying the Installation 2 7 Installation errors 2 8 3 Overview of a Code Develo...

Страница 10: ...he DSK assembler describes valid source file formats 5 1 Creating DSK Assembler Source Files 5 2 Using valid labels 5 3 Using the mnemonic field 5 4 Using the operand field 5 5 Commenting your source...

Страница 11: ...a particular address PORT option 7 3 Automatically search for a printer port TEST option 7 3 7 2 Understanding the Debugger Windows 7 4 DISASSEMBLY window 7 4 CPU REGISTER window 7 5 MEMORY window 7...

Страница 12: ...1 TMS320C3x DSK Functional Circuit Diagram 4 3 4 2 Parallel Port Control Register 0x37A 4 4 4 3 Parallel Port Status Register 0x379 4 4 4 4 DSK Memory Map 4 7 4 5 Data Packet Structure 4 8 4 6 Single...

Страница 13: ...Summary 6 2 7 1 Summary of Debugger Options 7 2 7 2 Editing Command Keys 7 7 7 3 Command Line Editing 7 10 7 4 Command Line Buffer Manipulation 7 10 7 5 Running Programs 7 10 7 6 Displaying and Changi...

Страница 14: ...Attribute Reference xiv Examples 2 1 Port Selection Display 2 9 3 1 File rand asm 3 5 4 1 Initialize the Serial Port Global Control Register 4 16 4 2 Setting the TA and TB Registers 4 20 6 1 Sections...

Страница 15: ...signal processing The DSK has a TMS320C31 on board to allow full speed verification of the TMS320C3x code The DSK also gives you the freedom to build new boards create your own software on a host PC...

Страница 16: ...g data acquisition via the TLC32040 analog interface circuit AIC J Variable rate analog to digital converter ADC and digital to analog converter DAC with 14 bit dynamic range at 20 000 samples per se...

Страница 17: ...an sion connectors include four 32 pin headers an 11 pin jumper block and a 12 pin XDS510 header The TLC32040 AIC interfaces to the TMS320C3x serial port A jumper block allows removal of this connecti...

Страница 18: ...1 4...

Страница 19: ...t DSK on a PC system running under DOS Topic Page 2 1 What You Need 2 2 2 2 Step 1 Connecting the DSK to Your PC 2 4 2 3 Step 2 Installing the DSK Software 2 5 2 4 Step 3 Modifying Your config sys Fil...

Страница 20: ...ated wall mount supplies the polarity of the 2 1 mm power jack does not mat ter Laboratory type power supplies with case grounds are not rec ommended since they can create ground loops and possibly cr...

Страница 21: ...unning the DSK debug ger interface Miscellaneous files Other files are included in your DSK package such as sample source files and additional documentation You can find a brief de scription of these...

Страница 22: ...into the DSK DB25 connector 4 Plug 7 12 Vdc or 6 9 Vac power supply into the DSK power supply con nector See Figure 2 1 for details Figure 2 1 Connecting Your Parallel Printer Port Cable and Transfor...

Страница 23: ...This directory will contain the DSK assembler and debugger software To create this directory enter md c dsktools 3 Insert your product disk into drive A Copy the contents of the disk using the follow...

Страница 24: ...system s autoexec bat file The general for mat for doing this is PATH C dsktools pathname2 pathname3 This allows you to invoke the debugger without specifying the name of the di rectory that contains...

Страница 25: ...SSEMBLY COMMAND MEMORY 809c03 50700080 startLDIU 00080h DP 809c04 08349c2c LDI 09c2cH SP 809c05 07608000 LDF 0 000000e 00 R0 809c06 c610c1c0 LDI AR0 R0 LDI AR 809c07 c610c1c0 LDI AR0 R0 LDI AR 809c08...

Страница 26: ...our printer port cable and connectors may not be connected snugly Your power transformer may not be plugged in on both ends If the DSK is receiving power then the LED will illuminate either red or gre...

Страница 27: ...ION I O CONNECTIONS AND CABLES POWER CONSERVATION SOFTWARE LAPTOPS AUTOEXEC BAT CONFIG SYS AND BIOS DAUGHTER CARDS VERY OLD PRINTER PORTS WITHOUT PULLUPS PRE 1986 IF THE LED IS CYCLING R Y G THE KERNE...

Страница 28: ...2 10...

Страница 29: ...to build new boards and expand the sys tem in any number of ways The DSK assembler and debugger are software interfaces that help you to develop test and refine DSK assembly language programs This ch...

Страница 30: ...create an output file Instead the DSK uses special directives to assemble code at an absolute address dur ing the assembly phase As a result you can create small programs quick ly and easily Easy to...

Страница 31: ...0 F3 FLOAT F4 Srce F5 Run F6 DispBP F7 ClrAll F8 SStep F9 Grow F10 FStep COMMAND 809c03 50700080 startLDIU 00080h DP 809c04 08349c2c LDI 09c2cH SP 809c05 07608000 LDF 0 000000e 00 R0 809c06 c610c1c0 L...

Страница 32: ...assembly language source files into machine language object files for the TMS320C3x family of processors Only the most essential assembler features are incorporated This is not a COFF assembler althou...

Страница 33: ...either by using the debugger or a bootloader This example does not use 0x809800 and 0x809801 since the bootloader uses these locations for stack space start CODE 0x809802 Start assembling CODE section...

Страница 34: ...s an executable file called rand dsk This file is used for directly loading executable code into the DSK The executable file includes a listing of all errors and warnings that may have occurred during...

Страница 35: ...n addition to performing full speed verification of your TMS320C3x code the DSK has expansion headers that allow you to build new daughterboards to expand your system This chapter details the function...

Страница 36: ...ammable array logic PAL determines when the C31 is accessing the host interface by using the STROBE A23 A22 A21 and A20 signals to decode the address of the C31 The PAL provides one input TRI that dis...

Страница 37: ...5 19 VCC VCC DEMO LTICPAL22V10Z 25 D Q0 D Q1 HPIA TRI NC Address decode TRI 0 1 10 11 8 74HCT245 74HCT245 0 1 4 EN EN DIR DIR TLC32040 IN IN OUT OUT MCLK RESET DR DX FSX FSR SCLK RESET INT2 READY H1 A...

Страница 38: ...and activates the bootload mode The host then downloads your pro gram or the communications kernel to the C31 The parallel port is mapped into the C31 memory to the address range 0xFFF000 0xFFFFFF as...

Страница 39: ...and drives the C31 s READY signal high This prevents the C31 from completing its write access The host uses the ERROR signal to acknowledge that the C31 is already sending data 3 When the host receive...

Страница 40: ...tional pins from the C31 control resetting and clocking signals to the AIC The C31 s TIMER0 pin drives the master input clock to the AIC The C31 s XF0 signal resets the AIC The AIC s analog input and...

Страница 41: ...800h 8098FFh 809C00h 809FC0h 809FC1h 809FFFh 80A000h 0x0BFFFFFh 0x0C00000h 0x0DEFFFFh 0x0E00000h 0x0EFFFFFh 0x0FFF000h 0x0FFFFFFh Reserved for boot loader operations Boot 1 External USER_BOOT Boot 2 R...

Страница 42: ...on typically consist of four fields command data stream length target address and target index This header is followed by the data stream as shown in Figure 4 5 The header fields are described as foll...

Страница 43: ...memory location pointed to by the target address The target address is incremented by the target index after each write operation XREAD Read a block of data from the DSK to the host This command reads...

Страница 44: ...ation Debugging functions provided in the communications kernel operate as a background task and they never disable the CPU or force a pipeline flush For example single stepping an opcode in scan base...

Страница 45: ...followed by a standard return from interrupt The processor is then free to execute code The communications kernel implements the opcode XSTEP by using a re served interrupt in the C31 Serial Port 1 t...

Страница 46: ...ldiu BUD or ldi ldiu _PC R5 CINT2 IF 4 IF 3 _ST ST R5 2000h ST _R5 R5 _DP DP return to PC from TOS return Clear Poll INT2 before SSTEP or RUNF Set XINIT1 interrupt restore Status turn on INT s restore...

Страница 47: ...ISR 11 Pipeline continues to fill with ISR ISR2 XSTEP ISR 12 Pipeline continues to fill with ISR ISR3 ISR2 XSTEP ISR 13 Execute first instruction of ISR ISR4 ISR3 ISR2 XSTEP ISR Table 4 1 describes t...

Страница 48: ...capacitor filter clocks and the A D and D A timing signals The timer pulses the TCLK0 signal whenever the C31 timer counter register memory mapped to 0x0080 8024h counts up to the timer period regist...

Страница 49: ...riod 1 TGCR0 set 808020h Timer 0 global control register TCNT0 set 808024h Timer 0 counter register TPR0 set 808028h Timer 0 period register TIMVAL word 3c1h Timer global control register value ldp TG...

Страница 50: ...R4 to zero sti R4 SGCR0 ldi SINIT1 R7 Reset and sti R7 SPCX0 initialize serial port sti R7 SPCR0 initialize serial port ldi SINIT0 R7 Reset and sti R7 SGCR0 initialize serial port Refer to the exampl...

Страница 51: ...A Conver sion_Frequency To initialize the AIC s Tx counter A and B registers you must send a primary communication followed by a secondary communication explained in the Pri mary communications subsec...

Страница 52: ...functions and gener ate nonstandard modem frequencies Secondary communications Secondary communication follows a primary communication that has the two LSBs set to 11 This secondary communication prog...

Страница 53: ...2 sets the TA and TB registers of the AIC This code transmits a 16 bit word to the AIC and then waits until the transmit interrupt is generated by the serial port Four commands are transmitted start i...

Страница 54: ...set 0x808028 TIM0 prd S0_gctrl set 0x808040 SP 0 global control S0_xctrl set 0x808042 SP 0 FSX DX CLKX port ctl S0_rctrl set 0x808043 SP 0 FSR DR CLKR port ctl S0_xdata set 0x808048 SP 0 Data transmit...

Страница 55: ...R3 pop ST reti ADC2 push ST push R3 ldi S0_rdata R3 sti R3 ADC_last pop R3 pop ST reti The startup stub is used during initialization only and can be safely overwritten by the stack or data entry ST_S...

Страница 56: ...up the Fs to final rate call prog_AIC smallest divisor should be last ldi A_REG R0 call prog_AIC b main prog_AIC ldi S0_xdata R1 Use original DXR data during 2 ndy sti R1 S0_xdata idle ldi S0_xdata R1...

Страница 57: ...es the low level routines that manipulate the data transmissions into packets that are recognized by the C31 communications kernel object cpp uses the target and driver level routines to initialize an...

Страница 58: ...ong addr ulong length ulong data Description The getmem routine reads a block of data from the C31 memory Arguments addr Address of the data to be read length Size of memory block to read data Pointer...

Страница 59: ...RECV_ERR Failed reception Run Command RUN_CPU Syntax MSGS RUN_CPU void Description The RUN_CPU routine executes instructions starting at the program counter obtained from the CPU context save area an...

Страница 60: ...escription The GET_DEBUG_CTXT routine retrieves the C31 context save location starting address The context address value is placed in the global variable DEBUG_CTXT Arguments External unsigned long DE...

Страница 61: ...routine resets the DSK by toggling the INIT signal Arguments None Return Value NO_ERR Reset sequence completed RESET_ERR Reset has failed Input Ready input_rdy Syntax char input_rdy void Description T...

Страница 62: ...S xmit_long ulong snd_data Description The xmit_long routine transmits a 32 bit value in four 8 bit data transfers to be used in bidirectional and unidirectional parallel printer ports Arguments snd_d...

Страница 63: ...t is defined in the file DSK_COFF H An ASCII hexadecimal file format that contains the bootloader header informa tion and raw data is also supported Since the header information defines where and how...

Страница 64: ...times This function also queries an existing communications kernel to determine if the kernel is configured for bytewide or nibble mode readback After initializing communications with the DSK the Load...

Страница 65: ...er and describes valid DSK source files Topic Page 5 1 Creating DSK Assembler Source Files 5 2 5 2 Constants 5 8 5 3 Character Strings 5 10 5 4 Symbols 5 11 5 5 Expression Analyzer 5 12 5 6 Assembling...

Страница 66: ...ialization value 1 into R7 sti R7 SPCX0 Initialize FSX DX CLKX control reg sti R7 SPCR0 Initialize FSR DR CLKR control reg ldi SINIT0 R7 Load initialization value 0 into R7 sti R7 SGCR0 Enable RINT an...

Страница 67: ...The DSK assembler does not require a label terminator When you use a label its value is the current value of the section program counter the label points to the statement it s associated with If for e...

Страница 68: ...IE set 0x2000 C3xMMRS ASM A_REG word TA 9 RA 2 0 0x809902 B_REG word TB 9 RB 2 2 0x809903 C_REG word 10000011b 0x809904 1 5 V S0_gctrl_val word 0x0E970300 S0_xctrl_val word 0x00000111 S0_rctrl_val wor...

Страница 69: ...s If you use the sign as a prefix the assembler treats the operand as the contents of a 32 bit ad dress specified by addr The 16 MSBs of the address are specified by the DP register the 16 LSBs are sp...

Страница 70: ...reindex add and modifica tion ARn disp Indirect with predisplacement or preindex subtract and modification ARn disp Indirect with postdisplacement or postindex add and modifi cation ARn disp Indirect...

Страница 71: ...or example Memory map register locations SGR0 set 0x808040 Serial port 0 global control register SPCX0 set 0x808042 Serial port 0 FSX DX CLKX control register SPCR0 set 0x808043 Serial port 0 FSR DR C...

Страница 72: ...ual to 21 0101b Constant equal to 5 Decimal integers A decimal integer constant is a string of decimal digits ranging from 2 147 483 647 to 4 294 967 295 Examples of valid decimal constants in clude 1...

Страница 73: ...ed internally as 12E3 C00016 A floating point constant can be preceded with a or sign Character constants A character constant is a single character enclosed in single quotes The char acters are repre...

Страница 74: ...is defined for each directive that re quires a character string Examples of valid character strings include sample program defines a 14 character string sample program temp asm defines an 8 character...

Страница 75: ...ister names as labels Constants Symbols can be set to constant values By using constants you can equate meaningful names with constant values The set directive enables you to set constants to symbolic...

Страница 76: ...se these functions with the COFF toolset then extract the resulting hexadecimal values from the DSK listing file Table 5 2 ANSI C Math Library Functions Supported by the DSK Assembler Function Descrip...

Страница 77: ...long circ long long Align the first value to the next address located by raising the second value to the power of 2 You can generate a table of values using certain assembler directives To gen erate a...

Страница 78: ...Not equal Subtraction Equal to Multiplication Equal to Division Logical AND Modulo Division Logical OR Greater than Logical XOR Greater than or equal to Bitwise negation 1s complement Less than Logica...

Страница 79: ...are not case sensitive If you do not specify an extension the assembler as sumes the default extension asm options affect the way the assembler processes input files You can specify options and filena...

Страница 80: ...ns at 0x809800 sect Mysect Assemble code into Mysect entry START Execution START point START LDI 0 R0 Initialize R0 0 LOOP ADDI 1 R0 Increment R0 B LOOP Do it again To place two sections of code that...

Страница 81: ...nd then use the include directive to append all assembly source files For example consider the following build file where three source files are appended to each other using a common block statement f...

Страница 82: ...5 18...

Страница 83: ...semble conditional blocks Topic Page 6 1 Using the DSK Assembler Directives 6 2 6 2 Directives That Define Sections 6 5 6 3 Directives That Initialize Constants 6 8 6 4 Directives That Reference Other...

Страница 84: ...he current section note that a label points to the beginning of the reserved space 6 29 float expression Initialize a 32 bit TMS320C3x floating point constant 6 21 float16 expression Initialize a 16 b...

Страница 85: ...d Directives that enable conditional assembly Mnemonic and Syntax Description Page else Optional conditional assembly 6 23 endif End conditional assembly 6 23 if well defined expression Begin conditio...

Страница 86: ...a local symbol 6 28 sdef value Equate a value with a local symbol multiple times 6 26 g Miscellaneous Directives Mnemonic and Syntax Description Page brstart section name n Align the named section to...

Страница 87: ...how you can use sections directives to associate code and data with the proper sections This is an output listing column 1 shows the SPC value and column 2 shows the memory contents if affected by the...

Страница 88: ...4 nocode 0x00809804 directive data 0x00809900 directive byte 9 10 0x00809900 0x00000009 byte 0x00809901 0x0000000a byte 0x00809902 directive byte 11 12 0x00809902 0x0000000b byte 0x00809903 0x0000000c...

Страница 89: ...Addressable ref Default Start 0x00809800 1 1 ref 0x00000001 1 2 ref text 0x00809800 1 1 ref data 0x00809900 1 1 ref mysect 0x00809a00 1 1 ref 0x00000001 1 2 Output section start end length sect Defaul...

Страница 90: ...not used and are filled with 0s The float8 directive converts an expression value into an 8 bit TMS320C3x floating point constant This format has a 4 bit exponent and a 4 bit mantissa This format can...

Страница 91: ...reserved block The string directive places 8 bit characters from one or more character strings into the current section The word directive places one or more 32 bit values into consecutive by tes in t...

Страница 92: ...f an expression Note that you cannot nest if statements if well defined expression marks the beginning of a conditional block and assembles code if the if well defined expression is true else marks a...

Страница 93: ...boundary it is not incremented The entry directive identifies the starting address of the section program counter By default the current address is used or you can specify an op tional address 6 7 Dir...

Страница 94: ...to the next 2n address boundary following the current section The end directive terminates assembly It should be the last source state ment of a program This directive has the same effect as an end of...

Страница 95: ...d together on one page Here is an alphabetical table of contents for the directive reference Directive Page Directive Page align 6 14 include 6 17 brstart 6 15 int 6 16 byte 6 16 long 6 16 copy 6 17 l...

Страница 96: ...example of the align directive Slightly modified FIR filter example from C3x Users Guide start ISR 0x809808 Create an output section which is sect ISR not on a 32 word boundary for demo align FIRLENG...

Страница 97: ...ction This directive aligns data buffers in order to use the C3x circular and bit reversed addressing modes Another method for creating a section whose start is bit reversed is to use the br func tion...

Страница 98: ...e words in the cur rent section The value must be an expression that evaluates to a number within the range of 32768 and 32767 The upper 16 bits are always 0 The long and word directives place 32 bit...

Страница 99: ...specify a full pathname the assembler searches for the file in the current directory The copy and include directives can be nested within a file that is copied or included the assembler limits this t...

Страница 100: ...ed variables Note that the assembler assumes that text is the default section Therefore at the beginning of an assembly the assembler assembles code into the text section unless you specify a section...

Страница 101: ...ve that terminates assembly It should be the last source statement of a program The assembler ignores any source statements that follow an end directive Example This example shows how the end directiv...

Страница 102: ...e encountered becomes the starting address of your code Example Here is an example of the entry directive start code 0x809800 Create a named section to assemble to sect code use the new section entry...

Страница 103: ...mat has a 4 bit exponent and a 4 bit mantissa When properly scaled this format can be used for quick logarithm approxi mations The pfloat16 directive converts a value into a 16 bit floating point cons...

Страница 104: ...ion of a single floating point constant into three bytes in the current section The expression is a required parameter it is an expression that must evaluate to a floating point constant Each constant...

Страница 105: ...evaluates to false 0 the assembler assembles code that follows an else if present or an endif The else directive identifies a block of code that the assembler assembles when the if expression is fals...

Страница 106: ...unt the number of loops to be per formed If there is no expression the loop count defaults to 246 The endloop directive terminates a repeatable block of code it executes when the number of loops perfo...

Страница 107: ...nd long integers whose decimal point is displaced xx places from the LSB Example Here s an example of the qxx directive The value of xx can be either positive or negative q0 3 1415926 All upper 32 bit...

Страница 108: ...pass 1 analysis When used with the if directive sdef can conditionally assemble included blocks of code This is useful for turning on and off included library functions The symbol must appear in the...

Страница 109: ...section name identifies the section The section name is significant to 80 characters and must be enclosed in double quotes Example Here s an example of the sect directive start Mysect_1 0x809800 Creat...

Страница 110: ...in assembly source This allows you to equate meaningful names with constants and other values The symbol must appear in the label field The value must be a well defined expression that is all symbols...

Страница 111: ...The fill directive reserves size number of words in the current section and fills them with value The value must be an absolute value The SPC is in cremented to point to the word following the reserv...

Страница 112: ...ion to have a valid starting address the start statement for the section must precede the text data or sect directive that defines the section name Note that by using an include file with an imbedded...

Страница 113: ...character in a string represents a separate value The string directive places the 8 bit values into memory in a packed form in the order they are encountered If a word is not filled the remaining bits...

Страница 114: ...embled into the text section the SPC is restored to its previous value in the section Note that the assembler assumes that text is the default section Therefore at the beginning of an assembly the ass...

Страница 115: ...DSK debugger and use its function keys and commands Topic Page 7 1 Invoking the Debugger 7 2 7 2 Understanding the Debugger Windows 7 4 7 3 Using the Help Menu 7 8 7 4 Using Software Breakpoints 7 9...

Страница 116: ...munication using the parallel port in standard 4 bit uni directional mode BW 8 Byte Forces communication using the parallel port in 8 bit bidirectional mode LPTx LPT x Selects a parallel printer port...

Страница 117: ...the LPTx AT Convention EISA and PS 2 I O Address LPT1 LPT2 ox378 LPT2 LPT3 0x278 LPT3 LPT1 0x3BC Select the parallel printer port at a particular address PORT option The port option selects the paral...

Страница 118: ...0 000000e 00 R0 809c06 c610c1c0 LDI AR0 R0 LDI AR 809c07 c610c1c0 LDI AR0 R0 LDI AR 809c08 08600100 LDI 256 R0 809c09 09a09c00 LSH 09c00H R0 809c0a 61809c0e BRD jump 809c0b 07618000 LDF 0 000000e 00...

Страница 119: ...SP 008098de R0 00000000 R1 00000000 R2 00000000 R3 00000000 R4 00000000 R5 00000000 R6 00000000 R7 00000000 AR0 00000000 AR1 00000000 AR2 00000000 AR3 00000000 AR4 00000000 AR5 00000000 AR6 00000000...

Страница 120: ...ed by 4 Although the window shows four columns of data there is still only one column of addresses address 0x0080 9800 con tains 0x0000 0007 address 0x0080 9801 contains 0xFFFF FFFC address 0x0080 980...

Страница 121: ...t from your commands and displays debugger error messages Figure 7 4 shows the window command line and display area Figure 7 4 COMMAND Window load testa J COMMAND Display area Command line You can use...

Страница 122: ...ll breakpoints F8 Singlestep F9 Toggle DASM window size F10 Step over function ALT D Selects Disassembly Window ALT M Selects Memory Window H Xtra help S save help to file Move Up Dn Pup Pdn To move t...

Страница 123: ...y of the run or single step commands You can set a software breakpoint by entering the SB command sb addr If you know the address where you d like to set a software breakpoint you can use the SB comma...

Страница 124: ...Move the cursor to the left Move the cursor to the right Table 7 4 Command Line Buffer Manipulation To do this Use this command Recall the last command typed PAGE UP or Recall the first command in th...

Страница 125: ...ow DASM addr Display extended precision registers in 40 bit hexade cimal format in the register window REG40 Display extended precision registers in floating point decimal format in the register windo...

Страница 126: ...Enter the DOS shell and optionally execute the ex pression Enter EXIT to return to debugger DOS expression to Run Enter the DOS shell and execute the editor to edit filename If no filename is given th...

Страница 127: ...p screen F2 Set breakpoint at cursor F3 Clear breakpoint at cursor F4 Run to cursor F5 Run F6 Display breakpoints F7 Clears all breakpoints F8 Single steps your program F9 Grow window F10 Step over SH...

Страница 128: ...a list of commands F2 Displays extended precision registers in 40 bit hex adecimal format F3 Displays extended precision registers in floating point decimal format F4 Toggles between displaying the so...

Страница 129: ...A 1 Appendix A Communications Kernel Source Code This appendix contains the source code for the TMS320C3x DSK communica tions kernel Appendix A...

Страница 130: ...ce it is no longer needed In this case the startup stub is placed after the stack Another safe location would be a section of memory which is used for I O or uninitialized data This section of code al...

Страница 131: ...and executed there may be other dummy fetches This pending interrupt then causes the processor to return back to the context save routine effectively singlestepping the CPU S0_xdata set 0x808048 SP 0...

Страница 132: ...lock size ldi _SP SP get user SP ldi _PC R5 return to PC from TOS return andn 0x4 IF Clear Poll INT2 before SSTEP or RUNF tstb 4 IF bnz 3 ldiu _ST ST restore Status or _IE IE BUD R5 or 2000h ST turn o...

Страница 133: ...DP pop IR0 save user PC sti IR0 _PC sti SP _SP save user SP sti BK _BK Block size sti IE _IE Internal int enable sti IF _IF CPU interrupt flags sti IOF _IOF IO flags sti RS _RS Repeat start sti RE _RE...

Страница 134: ...OWLEDGE zero to host b spin0 Branch is removed spin0 is inline The spin0 code loop is used by the kernel as a known program loop when a process is halted While in the spin loop commands can be process...

Страница 135: ...3 word 0 F3 _R4 word 0 F4 _R5 word 0 F5 _R6 word 0 F6 _R7 word 0 F7 _AR0 word 0 AR0 _AR1 word 0 AR1 _AR2 word 0 AR2 _AR3 word 0 AR3 _AR4 word 0 AR4 _AR5 word 0 AR5 _AR6 word 0 AR6 _AR7 word 0 AR7 _DP...

Страница 136: ...ece of data or command INTx maxspeed push ST Push ISR variables push DP push R0 NOTE A HALT command pops these push IR1 values followed by a full save push AR0 push AR1 ldp JUMP Get address of command...

Страница 137: ...ss from the primary vector table located in the bootloader ROM This 32 bit value is then used as an address where the new execution begins Since it is impossible to relocate the vector table or modify...

Страница 138: ...FFF000 ldi WSCOUNT AR1 WH sti R0 AR0 16 Store lsbs to HPI lsh WSHIFT R0 shift to next lsbs db AR1 WH loop until done pop DP b COMNHST R_HOST performs an interlocked Host Port read from the printer por...

Страница 139: ...tart JMPTBL 0x809FF4 sect JMPTBL JUMP word JUMP 0x809FF4 Jump table base address word XWRIT 1 0x809FF5 for DSK3 routines word XREAD 2 0x809FF6 word XCTXT 3 0x809FF7 word XRUNF 4 0x809FF8 word XSTEP 5...

Страница 140: ...Communications Kernel Source Code A 12...

Страница 141: ...tic Diagrams Figure B 1 shows the dimensions of the DSK circuit board and the rest of the appendix contains a brief description of the hardware in the TMS320C3x DSP Starter Kit the schematic diagrams...

Страница 142: ...rcuit Board Dimensions B 2 Figure B 1 TMS320C3x DSP Starter Kit DSK Circuit Board Dimensions TLC32040CFN 3 2000 2 1250 1 0750 0 0000 1 6560 0 1500 3 3500 3 2000 2 5820 0 7300 0 0500 0 0000 3 5000 5 00...

Страница 143: ...scillator The on board 50Mhz oscillator drives the C31 clock input The C31 internal clock value is divided by 1 same frequency Parallel printer port connector The DB25 25 pin connector connects direct...

Страница 144: ...d and then regulated by the LM7805 and LM7905 to 5V and 5V respectively The 5V and 5V supplies are used to power all of the DSK on board circuitry The TLC32040 AIC requires a negative poser supply of...

Страница 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...

Страница 146: ...Schematics B 6...

Страница 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...

Страница 148: ...Schematics B 8...

Страница 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...

Страница 150: ...Schematics B 10...

Страница 151: ...decodes Memory access times for the SRAM decoded output are as follows TIBPAL22V10Z CMOS at 50MHz H1 40ns t access H1 1 WS Tpal Td H1L A Tsu D R t access H1 1 WS 25ns 19ns wait states 0 1 2 3 4 t acc...

Страница 152: ..._ __ _ _ __ ___ ____ __________ ____ If an H bridge drive circuit is used with these signals an AC motor can be driven with an DSP controlled frequency By using an external PAL to provide additional r...

Страница 153: ...DEMO T0 T1 T0 T1 The decoded address ranges are as follows NOTE By using A23 as an enable it is possible to use external zero wait state RAM Essentialy by ignoring decoded outputs USER_BOOT 000000 0FF...

Страница 154: ...B 14...

Страница 155: ...ation codes and absolute or relocatable ad dresses for symbolic addresses assignment statement A statement that assigns a value to a variable autoexec bat A batch file that contains DOS commands for i...

Страница 156: ...s modular programming by supporting the concept of sections constant A numeric value that can be used as an operand cursor An icon on the screen such as a rectangle or a horizontal line that is used a...

Страница 157: ...rs the type of system the object file can be downloaded to the number of symbols in the symbol table and the symbol table s starting address G global A kind of symbol that is either 1 defined in the c...

Страница 158: ...age instruc tion assembler directive or macro directive options Command parameters that allow you to request additional or spe cific functions when you invoke a software tool P PC Personal computer or...

Страница 159: ...ep A form of program execution that allows you to see the effects of each statement The program is executed statement by statement the debugger pauses after each statement to update the data display w...

Страница 160: ...C 6...

Страница 161: ...2 key features 3 2 options 5 15 source listings 5 2 source statement format 5 2 symbols 5 11 assembler directives aligning the section program counter 6 11 alphabetical reference 6 13 to 6 32 conditio...

Страница 162: ...ers 5 8 hexadecimal integers 5 8 symbols as 5 8 contacting Texas Instruments vii copy directive 6 9 6 17 cursors command line cursor definition C 2 definition C 2 D data directive 6 5 6 18 data packet...

Страница 163: ...3 hexadecimal integers 5 8 host requirements 2 2 host software 4 23 I ieee directive 6 8 6 22 if directive 6 10 6 23 include directive 6 9 6 17 Init_System 4 30 input section definition C 3 input_rdy...

Страница 164: ...ctive 6 11 6 26 secondary communications 4 18 to 4 22 control register bit fields 4 19 data format 4 18 sect directive 6 5 6 27 section definition C 5 section program counter See SPC serial port defin...

Страница 165: ...11 predefined 5 11 T target cpp 4 23 text directive 6 5 6 32 timer period register value maximum 4 15 minimum 4 14 TLC32040 hardware interface 4 6 TLC32040 AIC initialization 4 14 to 4 22 V VGA defin...

Страница 166: ...Index 6...

Отзывы: