Manual Texas Instruments TMS320F20x/F24x DSP

108 pages 0.31 mb
Download

Go to site of 108

Summary
  • Texas Instruments TMS320F20x/F24x DSP - page 1

    TMS320F20x/F24x DSP Embedded Flash Memory T echnical Reference This document contains preliminary data current as of publication date and is subject to change without notice. Literature Number: SPRU282 September 1998 Printed on Recycled Paper ...

  • Texas Instruments TMS320F20x/F24x DSP - page 2

    IMPORT ANT NOTICE T exas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify , before placing orders, that information being relied on is current and complete. All product ...

  • Texas Instruments TMS320F20x/F24x DSP - page 3

    iii PRELIMINARY Preface Read This First About This Manual This reference guide describes the operation of the embedded flash EEPROM module on the TMS320F20x/F24x digital signal processor (DSP) devices and provides sample code that you can use in developing your own software. The performance specifications of the embedded flash memory have been eval ...

  • Texas Instruments TMS320F20x/F24x DSP - page 4

    PRELIMINARY iv PRELIMINARY If you are looking for in- formation about: T urn to these locations: Over-erasure (depletion) and recovery Section 1.1, Basic Concepts of Flash Memory T echnology Section 2.7, Recovering From Over-Erasure (Flash-Write Operation) Section 3.4, Flash-Write Algorithm Programming the flash array Section 1.1, Basic Concepts of ...

  • Texas Instruments TMS320F20x/F24x DSP - page 5

    Related Documentation From T exas Instruments PRELIMINARY v Read This First PRELIMINARY Related Documentation From T exas Instruments The following books describe the ’F20x/24x and related support tools. T o ob- tain a copy of any of these TI documents, call the T exas Instruments Literature Response Center at (800) 477–8924. When ordering, ple ...

  • Texas Instruments TMS320F20x/F24x DSP - page 6

    Related Documentation From T exas Instruments PRELIMINARY vi PRELIMINARY TMS320C2xx C Source Debugger User ’s Guide (literature number SPRU151) tells you how to invoke the ’C2xx emulator and simulator ver- sions of the C source debugger interface. This book discusses various aspects of the debugger interface, including window management, com- m ...

  • Texas Instruments TMS320F20x/F24x DSP - page 7

    If Y ou Need Assistance . . . PRELIMINARY vii Read This First PRELIMINARY If Y ou Need Assistance . . . - World-W ide Web Sites TI Online http://www .ti.com Semiconductor Product Information Center (PIC) http://www .ti.com/sc/docs/pic/home.htm DSP Solutions http://www .ti.com/dsps 320 Hotline On-line t http://www .ti.com/sc/docs/dsps/support.htm - ...

  • Texas Instruments TMS320F20x/F24x DSP - page 8

    PRELIMINARY viii PRELIMINARY ...

  • Texas Instruments TMS320F20x/F24x DSP - page 9

    Contents ix Contents 1 Introduction 1 Ć 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discusses basic flash memory technology; summarizes the features and benefits of the TMS320F20x/F24x flash module 1.1 Basic Concepts of Flash Memory T echnology 1 Ć 2 . ...

  • Texas Instruments TMS320F20x/F24x DSP - page 10

    Contents x A.1.1 Header File for Constants and V ariables, SV AR20.H A Ć 2 . . . . . . . . . . . . . . . . . . . . . A.1.2 Clear Algorithm, SCLR20.ASM A Ć 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1.3 Erase Algorithm, SERA20.ASM A Ć 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Texas Instruments TMS320F20x/F24x DSP - page 11

    Figures xi Contents Figures 1–1 TMS320F20x/F24x Program Space Memory Maps 1 Ć 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1 Flash Memory Logic Levels During Programming and Erasing 2 Ć 4 . . . . . . . . . . . . . . . . . . . . . . 2–2 Memory Maps in Register and Array Access Modes 2 Ć 6 . . . . . . . . . . . . . . . ...

  • Texas Instruments TMS320F20x/F24x DSP - page 12

    T ables xii T ables 1–1 TMS320 Devices With On-Chip Flash EEPROM 1 Ć 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1 Operations that Modify the Contents of the Flash Array 2 Ć 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Flash Module Control Registers 2 Ć 8 . . . . . . . . . . . . . . . . . . . . ...

  • Texas Instruments TMS320F20x/F24x DSP - page 13

    1-1 Introduction The TMS320F20x/F24x digital signal processors (DSPs) contain on-chip flash EEPROM (electrically-erasable programmable read-only memory). The em- bedded flash memory provides an attractive alternative to masked program ROM. Like ROM, flash memory is nonvolatile, but it has an advantage over ROM: in-system reprogrammability . This ch ...

  • Texas Instruments TMS320F20x/F24x DSP - page 14

    Basic Concepts of Flash Memory T echnology PRELIMINARY 1-2 PRELIMINARY 1.1 Basic Concepts of Flash Memory T echnology The term flash in this EEPROM technology refers to the speed of some of the operations performed on the memory (these operations will be described in greater detail later in this document). An entire block of bits is affected simult ...

  • Texas Instruments TMS320F20x/F24x DSP - page 15

    TMS320F20x/F24x Flash Module PRELIMINARY 1-3 Introduction PRELIMINARY 1.2 TMS320F20x/F24x Flash Module The ’F20x/F24x flash EEPROM is implemented with one or two independent flash memory modules of 8K or 16K words. Each flash module is composed of a flash memory array , four control registers, and circuitry that produces ana- log voltages for pro ...

  • Texas Instruments TMS320F20x/F24x DSP - page 16

    TMS320F20x/F24x Flash Module PRELIMINARY 1-4 PRELIMINARY Simplified memory maps for the program space of the TMS320F20x/F24x de- vices are shown in Figure 1–1 to illustrate the location of the flash modules. Figure 1–1. TMS320F20x/F24x Program Space Memory Maps 0000h 1FFFh FFFFh Flash0 TMS320F241 Flash0 0000h 1FFFh Flash0 4000h 3FFFh 0000h FFFF ...

  • Texas Instruments TMS320F20x/F24x DSP - page 17

    Benefits of Embedded Flash Memory in a DSP System PRELIMINARY 1-5 Introduction PRELIMINARY 1.3 Benefits of Embedded Flash Memory in a DSP System The circuitry density of flash memory is about half that of conventional EE- PROM memory , making it possible to approach DRAM densities with flash memory . This increased density allows flash memory to be ...

  • Texas Instruments TMS320F20x/F24x DSP - page 18

    PRELIMINARY 1-6 PRELIMINARY ...

  • Texas Instruments TMS320F20x/F24x DSP - page 19

    2-1 Flash Operations and Control Registers The operations that modify the contents of the ’F20x/F24x flash array are per- formed in software through the use of dedicated programming algorithms. This chapter introduces the operations performed by these algorithms and explains the role of the control registers in this process. The actual algorithms ...

  • Texas Instruments TMS320F20x/F24x DSP - page 20

    Operations that Modify the Contents of the ’F20x/F24x Flash Array PRELIMINARY 2-2 PRELIMINARY 2.1 Operations that Modify the Contents of the ’F20x/F24x Flash Array Operations that modify the contents of the flash array are generically referred to as either “programming,” which drives one or more bits toward the logic zero state, or “erasi ...

  • Texas Instruments TMS320F20x/F24x DSP - page 21

    Operations that Modify the Contents of the ’F20x/F24x Flash Array PRELIMINARY 2-3 Flash Operations and Control Registers PRELIMINARY This procedure is discussed in complete detail in Chapter 3. During these operations that are used to modify the contents of the flash array , three special read modes, and a corresponding set of reference voltage l ...

  • Texas Instruments TMS320F20x/F24x DSP - page 22

    Operations that Modify the Contents of the ’F20x/F24x Flash Array PRELIMINARY 2-4 PRELIMINARY Figure 2–1. Flash Memory Logic Levels During Programming and Erasing Erase operation Depletion Mode Logic 1 1 Margin 0 Margin Logic 0 VER0 Erase (T owards logic Clear Program Flash Write (T owards logic Reference level Inverse Erase Program operations ...

  • Texas Instruments TMS320F20x/F24x DSP - page 23

    Accessing the Flash Module PRELIMINARY 2-5 Flash Operations and Control Registers PRELIMINARY 2.2 Accessing the Flash Module In addition to the flash memory array , each flash module has four registers that control operations on the flash array . These registers are:  Segment control register (SEG_CTR)  T est register (TST)  Write address ...

  • Texas Instruments TMS320F20x/F24x DSP - page 24

    Accessing the Flash Module PRELIMINARY 2-6 PRELIMINARY Figure 2–2. Memory Maps in Register and Array Access Modes SEG_CTR register TST register W ADRS register WDA T A register Flash memory array Flash access control register (single bit) MODE = 1: Array-access mode MODE = 0: Register access mode 0100 ... 010 0100 ... 01 1 1 1 10 ...1 10 01 10 .. ...

  • Texas Instruments TMS320F20x/F24x DSP - page 25

    Accessing the Flash Module PRELIMINARY 2-7 Flash Operations and Control Registers PRELIMINARY Although the function is the same, the access control registers of the ’F206 de- vice are mapped at different addresses from that of the ’F24x devices, and their values are modified in a different way . 2.2.2 TMS320F24x Flash Access-Control Register Th ...

  • Texas Instruments TMS320F20x/F24x DSP - page 26

    Flash Module Control Registers PRELIMINARY 2-8 PRELIMINARY 2.3 Flash Module Control Registers T able 2–2 lists the control registers and their relative addresses within the four locations that repeat throughout the module’s address range. T able 2–2. Flash Module Control Registers Relative Register Described in ... R e l at i ve Address R eg ...

  • Texas Instruments TMS320F20x/F24x DSP - page 27

    Flash Module Control Registers PRELIMINARY 2-9 Flash Operations and Control Registers PRELIMINARY T able 2–3. Segment Control Register Field Descriptions Bits Name Description 15–8 SEG7–SEG0 Segment enable bits. Each of these bits protects the specified segment against pro- gramming or enables programming for the specified segment in the arra ...

  • Texas Instruments TMS320F20x/F24x DSP - page 28

    Flash Module Control Registers PRELIMINARY 2-10 PRELIMINARY T able 2–4. Flash Array Segments Summary SEG7–SEG0 Bits ’F206/F240 Flash Module † ’F241 / F24 3 Arr ay Seg m e nt 15 14 13 12 11 10 9 8 Flash0 Flash1 F241/F243 Flash Module Array Segment Enabled 0 0 0 0 0 0 0 1 0000–07FFh 4000–47FFh 0000–03FFh 0 00000010 0800–0FFFh 4800? ...

  • Texas Instruments TMS320F20x/F24x DSP - page 29

    Flash Module Control Registers PRELIMINARY 2-1 1 Flash Operations and Control Registers PRELIMINARY 2.3.4 Write Data Register (WDA T A) The write data register (WDA T A) is a 16-bit register that contains the latched write data for a programming operation. In array-access mode, this register can be loaded by writing a data value to the flash module ...

  • Texas Instruments TMS320F20x/F24x DSP - page 30

    Read Modes PRELIMINARY 2-12 PRELIMINARY 2.4 Read Modes The ’F20x/F24x flash module uses four read modes and corresponding sets of reference levels:  Standard  V erify 0s (VER0)  V erify 1s (VER1)  Inverse-erase Read mode selection is accomplished through the verify bits (bits 3 and 4) in SEG_CTR during execution of the algorithms. In ...

  • Texas Instruments TMS320F20x/F24x DSP - page 31

    Program Operation PRELIMINARY 2-13 Flash Operations and Control Registers PRELIMINARY 2.5 Program Operation The program operation of the ’F20x/F24x flash module loads the application- specific data (a pattern of 0s) into the flash array . The basis of the operation is applying a program pulse to a single word of flash memory . The term pro- gram ...

  • Texas Instruments TMS320F20x/F24x DSP - page 32

    Erase Operation PRELIMINARY 2-14 PRELIMINARY 2.6 Erase Operation The erase operation of the ’F20x/F24x flash module prepares the flash array for programming and enables reprogrammability of the flash array . Before the array can be erased, all bits must be programmed to 0s. This procedure of pro- gramming all array locations in preparation for th ...

  • Texas Instruments TMS320F20x/F24x DSP - page 33

    Recovering From Over-Erasure (Flash-Write Operation) PRELIMINARY 2-15 Flash Operations and Control Registers PRELIMINARY 2.7 Recovering From Over-Erasure (Flash-Write Operation) Generally , not all bits in the flash array have the same amount of charge re- moved with each erase pulse. By the time all bits have reached the VER1 read margin (and eras ...

  • Texas Instruments TMS320F20x/F24x DSP - page 34

    Reading From the Flash Array PRELIMINARY 2-16 PRELIMINARY 2.8 Reading From the Flash Array Once the array is programmed, it is read in the same manner as other memory devices on the DSP memory interface. The flash module operates with zero wait states. When you are reading the flash module, the flash segment control register (SEG_CTR) bits should b ...

  • Texas Instruments TMS320F20x/F24x DSP - page 35

    3-1 Algorithm Implementations and Software Considerations This chapter discusses the implementations of the algorithms for performing the operations described in the previous chapter . It also discusses items you must consider when incorporating the algorithms into your ’F20x/F24x DSP application code. T opic Page 3.1 How the Algorithms Fit Into ...

  • Texas Instruments TMS320F20x/F24x DSP - page 36

    How the Algorithms Fit Into the Program-Erase-Reprogram Flow PRELIMINARY 3-2 PRELIMINARY 3.1 How the Algorithms Fit Into the Program-Erase-Reprogram Flow The algorithms discussed in this chapter can be used to reprogram the ’F20x/F24x flash module multiple times. The clear algorithm, erase algorithm, and flash-write algorithm are used to prepare ...

  • Texas Instruments TMS320F20x/F24x DSP - page 37

    How the Algorithms Fit Into the Program-Erase-Reprogram Flow PRELIMINARY 3-3 Algorithm Implementations and Software Considerations PRELIMINARY Figure 3–1. Algorithms in the Overall Flow Flash-write algorithm Erase algorithm Clear algorithm X = X+1 flash-write Recover using Fail Ye s No X < 10 ? array Erase the Clear the array No Ye s Reprogram ...

  • Texas Instruments TMS320F20x/F24x DSP - page 38

    Programming (or Clear) Algorithm PRELIMINARY 3-4 PRELIMINARY 3.2 Programming (or Clear) Algorithm The programming algorithm sequentially writes any number of addresses with a specified bit pattern.This algorithm is used to program application code or data into the flash array . With a slight modification, the same algorithm per- forms the clear por ...

  • Texas Instruments TMS320F20x/F24x DSP - page 39

    Programming (or Clear) Algorithm PRELIMINARY 3-5 Algorithm Implementations and Software Considerations PRELIMINARY The main feature of the program/clear algorithm is the concept of program- ming an entire row of bits in a group. The ’F20x/F24x flash array is organized in rows of 32 words. That is, addresses 0000h through 001Fh are physically loca ...

  • Texas Instruments TMS320F20x/F24x DSP - page 40

    Programming (or Clear) Algorithm PRELIMINARY 3-6 PRELIMINARY Figure 3–3. Programming or Clear Algorithm Flow Same row Device failure Continue Current address > end address? No Ye s Row_done = true? No Ye s No Ye s End of row? No Ye s Pulsecount  =max † ? Apply program pulse; row_done = false Increment address New row V erify con- tents of ...

  • Texas Instruments TMS320F20x/F24x DSP - page 41

    Programming (or Clear) Algorithm PRELIMINARY 3-7 Algorithm Implementations and Software Considerations PRELIMINARY Another important consideration is the total amount of time required to do the programming. The number of programming pulses required to completely pro- gram a flash memory cell increases as ambient temperature increases and/or supply ...

  • Texas Instruments TMS320F20x/F24x DSP - page 42

    Programming (or Clear) Algorithm PRELIMINARY 3-8 PRELIMINARY T able 3–1. Steps for V erifying Programmed Bits and Applying One Program or Clear Pulse (Continued) Step Description Action 7 Mask the data to program lower byte. Mask any bits in the lower byte that do not require programming (are al- ready read as zero), and mask off upper byte. Reca ...

  • Texas Instruments TMS320F20x/F24x DSP - page 43

    Programming (or Clear) Algorithm PRELIMINARY 3-9 Algorithm Implementations and Software Considerations PRELIMINARY Before each program pulse is applied, a read of the byte is performed to deter- mine which bits have reached the programmed level. Any bits that have reached the programmed level are masked (set to 1 in the WDA T A register). This meth ...

  • Texas Instruments TMS320F20x/F24x DSP - page 44

    Erase Algorithm PRELIMINARY 3-10 PRELIMINARY 3.3 Erase Algorithm The erase algorithm follows the clear algorithm in executing the entire initial- ization flow . Figure 3–4 highlights the erase algorithm’s place in the overall flow . Figure 3–4. Erase Algorithm in the Overall Flow Flash-write algorithm Erase algorithm Clear algorithm X = X+1 f ...

  • Texas Instruments TMS320F20x/F24x DSP - page 45

    Erase Algorithm PRELIMINARY 3-1 1 Algorithm Implementations and Software Considerations PRELIMINARY T able 3–2. Steps for Applying One Erase Pulse Step Action Description 1 Power up the V CCP pin. Set V CCP pin to V DD. If the V CCP pin for the flash module to be erased is not set to V DD , then the array will not be erased properly . 2 Load WDA ...

  • Texas Instruments TMS320F20x/F24x DSP - page 46

    Erase Algorithm PRELIMINARY 3-12 PRELIMINARY 4) The actual address is restored. 5) The contents of the restored address are read. The advantage of this approach is that it forces the worst-case switching condi- tion on the flash addressing logic during the reads, thus improving the margin of the erase. Address complementing on the ’F20x/F24x can ...

  • Texas Instruments TMS320F20x/F24x DSP - page 47

    Erase Algorithm PRELIMINARY 3-13 Algorithm Implementations and Software Considerations PRELIMINARY Figure 3–5. Erase Algorithm Flow Program array check Depletion Ye s No All 32 words = 0000h? Read first 32 words W ait for t d(BUSY -INVERSE) Set VER0 and VER1 bits in SEG_CTR Clear all bits in SEG_CTR Start (all words=0000h) erase V erify No Ye s N ...

  • Texas Instruments TMS320F20x/F24x DSP - page 48

    Flash-Write Algorithm PRELIMINARY 3-14 PRELIMINARY 3.4 Flash-W rite Algorithm The flash-write operation recovers bits in depletion mode, which can be caused by over-erasure. The flash-write algorithm’s place in the overall flow is highlighted in Figure 3–6. Figure 3–6. Flash-Write Algorithm in the Overall Flow Flash-write algorithm Erase algo ...

  • Texas Instruments TMS320F20x/F24x DSP - page 49

    Flash-Write Algorithm PRELIMINARY 3-15 Algorithm Implementations and Software Considerations PRELIMINARY T able 3–3. Steps for Applying One Flash-Write Pulse Steps Action Description 1 Power up the V CCP pin. Set the V CCP pin to V DD . If the V CCP pin for the flash module to be re- covered is not set to V DD , then the flash-write operation wil ...

  • Texas Instruments TMS320F20x/F24x DSP - page 50

    Flash-Write Algorithm PRELIMINARY 3-16 PRELIMINARY Figure 3–7. Flash-Write Algorithm Flow Start Depletion check No Ye s No Ye s Flash-write pulse count ≥ Max † ? Device failure Apply one flash-write pulse to flash array (see T able 3–3) All 32 words = 0000h? Read first 32 words W ait for t d(RD-VERIFY) Set VER0 and VER1 bits in SEG_CTR Go t ...

  • Texas Instruments TMS320F20x/F24x DSP - page 51

    Flash-Write Algorithm PRELIMINARY 3-17 Algorithm Implementations and Software Considerations PRELIMINARY The CPU frequency range for the application is an important consideration for the depletion test, as well as for the program and erase operations. Because of the actual implementation of the flash memory circuitry , a bit in depletion mode is mo ...

  • Texas Instruments TMS320F20x/F24x DSP - page 52

    PRELIMINARY 3-18 PRELIMINARY ...

  • Texas Instruments TMS320F20x/F24x DSP - page 53

    A-1 Appendix A Assembly Source Listings and Program Examples The flash array is erased and programmed by code running on the DSP core. This code can originate from off-chip memory or can be loaded into on-chip RAM. The available flash programming tools for the ’F20x/F24x allow you to program the on-chip flash module without having knowledge or vi ...

  • Texas Instruments TMS320F20x/F24x DSP - page 54

    Assembly Source for Algorithms PRELIMINARY A-2 PRELIMINARY A.1 Assembly Source for Algorithms The algorithm source files implement the flows given in Chapter 3. Each algo- rithm is written as an assembly language subroutine, beginning with a label at an entry point and ending with a return instruction. The algorithms share a set of 16 relocatable v ...

  • Texas Instruments TMS320F20x/F24x DSP - page 55

    Assembly Source for Algorithms PRELIMINARY A-3 Assembly Source Listings and Program Examples PRELIMINARY ************************************************************** ** Variable declaration file ** * ** * TMS320F2XX Flash Utilities. ** * Revision: 2.0, 9/10/97 ** * Revision: 2.1, 1/31/98 ** * ** * Filename: svar20.asm ** * ** *Note: ** *DLOOP is ...

  • Texas Instruments TMS320F20x/F24x DSP - page 56

    Assembly Source for Algorithms PRELIMINARY A-4 PRELIMINARY *CONSTANTS * ********************************************************* *Conditional assembly variable for F24X vs F206. * *If F24X = 1, then assemble for F24X; otherwise, * *assemble for F206. * ********************************************************* F24X .set 0 ;Assemble for F206 ;F24X . ...

  • Texas Instruments TMS320F20x/F24x DSP - page 57

    Assembly Source for Algorithms PRELIMINARY A-5 Assembly Source Listings and Program Examples PRELIMINARY A.1.2 Clear Algorithm, SCLR20.ASM This code is an implementation of the clear (programming) algorithm de- scribed in section 3.2 on page 3-4. Recall that the clear algorithm is identical to the programming algorithm with the data forced to 0000h ...

  • Texas Instruments TMS320F20x/F24x DSP - page 58

    Assembly Source for Algorithms PRELIMINARY A-6 PRELIMINARY * programmed bits. For example, if the flash is programmed * * using a CLKOUT period of 50 ns, the flash can be read back * reliably over the CLKOUT period range of 50 ns to 150 ns * * (6.67 MHz–20 MHz). The programming pulse-duration is * * 100 us, and a maximum of 150 pulses is applied ...

  • Texas Instruments TMS320F20x/F24x DSP - page 59

    Assembly Source for Algorithms PRELIMINARY A-7 Assembly Source Listings and Program Examples PRELIMINARY SACL FL_ST ;Save array start address. LACL FL_ADRS ;Get segment start address. NEWROW ;********Begin a new row.* SACL BASE_1 ;Save row start address. LAR AR1,#0 ;Init pulse count to zero. SAMEROW ;********Same row, next pulse.* SPLK #1,BASE_0 ;S ...

  • Texas Instruments TMS320F20x/F24x DSP - page 60

    Assembly Source for Algorithms PRELIMINARY A-8 PRELIMINARY * SPAD2 Flash program + EXE command. * ************************************************************* EXE_PGM ;* CALL ARRAY ;ACCESS ARRAY * *LOAD WADRS AND WDATA ** LACL FL_ADRS ;ACC => PROGRAM ADRS * TBLW FL_DATA ;LOAD WADRS AND WDATA * CALL REGS ;ACCESS FLASH REGS * *SET UP WRITE COMMAN ...

  • Texas Instruments TMS320F20x/F24x DSP - page 61

    Assembly Source for Algorithms PRELIMINARY A-9 Assembly Source Listings and Program Examples PRELIMINARY TBLW SPAD1 ;EXECUTE COMMAND * LAR AR6,#D10 ;SET DELAY * CALL DELAY,*,AR6 ;WAIT * CALL ARRAY ;ACCESS FLASH ARRAY * RET ;RETURN TO CALLING SEQUENCE* ************************************************************* ************************************ ...

  • Texas Instruments TMS320F20x/F24x DSP - page 62

    Assembly Source for Algorithms PRELIMINARY A-10 PRELIMINARY A.1.3 Erase Algorithm, SERA20.ASM This code is an implementation of the erase algorithm described in section 3.3 on page 3-10. Memory section: fl_ers Entry point: GERS Parameters to be declared and initialized by the calling code are:  PROTECT defines the values of bits 8–15 of SEG_CT ...

  • Texas Instruments TMS320F20x/F24x DSP - page 63

    Assembly Source for Algorithms PRELIMINARY A-1 1 Assembly Source Listings and Program Examples PRELIMINARY * The erase pulse duration is 7ms, and a maximum of ** * 1000 pulses is applied to the array. ** * ** * The following resources are used for temporary storage: ** * AR0 Used for comparisons ** * AR1 Used for erase pulse count ** * AR2 Used for ...

  • Texas Instruments TMS320F20x/F24x DSP - page 64

    Assembly Source for Algorithms PRELIMINARY A-12 PRELIMINARY CLRC OVM ;Disable overflow mode. LACL SEG_ST ;Get segment start address. AND #04000h ;Get array start address. SACL FL_ST ;Save array start address. OR #03FFFh ;Get array end address. SACL FL_END ;Save array end address. SPLK #0,ERROR ;Reset error flag LAR AR1,#0 ;Set erase count to 0. SPL ...

  • Texas Instruments TMS320F20x/F24x DSP - page 65

    Assembly Source for Algorithms PRELIMINARY A-13 Assembly Source Listings and Program Examples PRELIMINARY ***** If here, then an error has occurred. EXIT SPLK #1,ERROR ;Update error flag SPLK #STOP,BASE_0 ;Stop command. CALL SET_MODE ;Disable any flash cmds. B DONE ;Get outa here. ************************************************************ .page * ...

  • Texas Instruments TMS320F20x/F24x DSP - page 66

    Assembly Source for Algorithms PRELIMINARY A-14 PRELIMINARY * * * The following resources are used for temporary storage: * * BASE_0 Flash STOP command, and FFFF for WDATA. * * BASE_5 Flash erase command. * * BASE_6 Flash erase + EXE command. * ************************************************************* ERASE_A * SET UP FLASH ERASE COMMANDS FOR P ...

  • Texas Instruments TMS320F20x/F24x DSP - page 67

    Assembly Source for Algorithms PRELIMINARY A-15 Assembly Source Listings and Program Examples PRELIMINARY A.1.4 Flash-Write Algorithm, SFL W20.ASM This code is an implementation of the flash-write algorithm described in sec- tion 3.4 on page 3-14. Memory section: fl_wrt Entry point: FL WS Parameters to be declared and initialized by the calling cod ...

  • Texas Instruments TMS320F20x/F24x DSP - page 68

    Assembly Source for Algorithms PRELIMINARY A-16 PRELIMINARY * BASE_3 Used for EXE + flw cmd * ************************************************************** .include ”svar20.h” ;defines variables for flash0 ;or for flash1 array * MAX_FLW .set 10000 ;Allow only 10000 flw pulses. INV_ER .set 018h ;INVERSE ERASE COMMAND WORD FLWR .set 6 ;FLASH WRI ...

  • Texas Instruments TMS320F20x/F24x DSP - page 69

    Assembly Source for Algorithms PRELIMINARY A-17 Assembly Source Listings and Program Examples PRELIMINARY BCND FL_WRITE, NEQ ;If ACC<>0, then flwrite. *Else, continue until until done with row. BANZ NEXT_IVERS ;Loop 32 times. SPLK #STOP,BASE_0 ;Flash STOP command. CALL SET_MODE ;Disable flash commands. ;If here then test passed. DONE RET ;Ret ...

  • Texas Instruments TMS320F20x/F24x DSP - page 70

    Assembly Source for Algorithms PRELIMINARY A-18 PRELIMINARY LAR AR0,#MAX_FLW CMPR 2 ;If AR1>MAX_FLW then BCND EXIT,TC ;Fail, don’t continue recovery. B INV_ERASE ;Else, perform iverase again. ************************************************** * SET_MODE: This routine sets the flash in the * * mode specified by the contents of BASE_0. This * * ...

  • Texas Instruments TMS320F20x/F24x DSP - page 71

    Assembly Source for Algorithms PRELIMINARY A-19 Assembly Source Listings and Program Examples PRELIMINARY A.1.5 Programming Algorithm, SPGM20.ASM This code is an implementation of the program algorithm described in section 3.2 on page 3-4. Memory section: fl_prg Entry point: GPGMJ Parameters to be declared and initialized by the calling code are: ? ...

  • Texas Instruments TMS320F20x/F24x DSP - page 72

    Assembly Source for Algorithms PRELIMINARY A-20 PRELIMINARY * bits. For example, if the flash is programmed using a * * CLKOUT period of 50 ns, the flash can be reliably read * * back over the CLKOUT period range of 50 ns to 150 ns * * (6.67MHz–20 MHz). The programming pulse duration is * * 100 us, and a maximum of 150 pulses is applied per row. ...

  • Texas Instruments TMS320F20x/F24x DSP - page 73

    Assembly Source for Algorithms PRELIMINARY A-21 Assembly Source Listings and Program Examples PRELIMINARY * BASE_3 Used for buffer/row start addr * * BASE_4 Used for destination end addr * * BASE_5 Used for byte mask * ****************************************************** GPGMJ: SPLK #0,IMR ;MASK ALL INTERRUPTS SETC INTM ;GLOBALLY MASK ALL INTERRU ...

  • Texas Instruments TMS320F20x/F24x DSP - page 74

    Assembly Source for Algorithms PRELIMINARY A-22 PRELIMINARY BCND EXIT,TC ;fail, don’t continue. B SAMEROW ;else, go to beginning ;of same row. ** If row done, then check if Array done. * ROW_DONE LACL FL_ADRS ;Check if end of array. SUB BASE_4 ;Subtract end addr. BCND DONE, GT ;If >0 then done. ** Else, go to next row. * LACL FL_ADRS B NEWROW ...

  • Texas Instruments TMS320F20x/F24x DSP - page 75

    Assembly Source for Algorithms PRELIMINARY A-23 Assembly Source Listings and Program Examples PRELIMINARY SPLK #04000h,FL_ST ;FL_ST = FLASH1 CTRL REGS FL0 RET ************************************************************* .page ************************************************************* * THIS SECTION PROGRAMS THE VALUE STORED IN FL_DATA INTO * * ...

  • Texas Instruments TMS320F20x/F24x DSP - page 76

    Assembly Source for Algorithms PRELIMINARY A-24 PRELIMINARY LACL FL_ST ;ACC => FLASH * SPLK #VER0,SPAD1 ;ACTIVATE VER0 * TBLW SPAD1 ;EXECUTE COMMAND * LAR AR6,#D10 ;SET DELAY * CALL DELAY,*,AR6 ;WAIT * CALL ARRAY ;ACCESS FLASH ARRAY * LACL FL_ADRS ;POINT TO ADRS * TBLR FL_DATA ;GET FLASH WORD 1x read * TBLR FL_DATA ; 2x read * TBLR FL_DATA ; 3x ...

  • Texas Instruments TMS320F20x/F24x DSP - page 77

    Assembly Source for Algorithms PRELIMINARY A-25 Assembly Source Listings and Program Examples PRELIMINARY A.1.6 Subroutines Used By All Four Algorithms, SUTILS20.ASM This assembly file includes two subroutines that change the flash module ac- cess mode and one subroutine that performs software delays. More details on the individual functions are gi ...

  • Texas Instruments TMS320F20x/F24x DSP - page 78

    Assembly Source for Algorithms PRELIMINARY A-26 PRELIMINARY SPLK #0000h,SPAD2 ***********The next instruction is for F240 only************* .if F24X = 1 ;Assemble for F24X only. OUT SPAD2,F24X_ACCS ;Enable F240 flash reg mode. ;SPAD1 is dummy value. .endif ************************************************************* .if F24X = 0 ;Assemble for F206 ...

  • Texas Instruments TMS320F20x/F24x DSP - page 79

    C-Callable Interface to Flash Algorithms PRELIMINARY A-27 Assembly Source Listings and Program Examples PRELIMINARY A.2 C-Callable Interface to Flash Algorithms The two functions erase() and program() are intended for in-application pro- gramming of the ’F20x/F24x flash module. These functions were written to be C callable, but they can also be c ...

  • Texas Instruments TMS320F20x/F24x DSP - page 80

    C-Callable Interface to Flash Algorithms PRELIMINARY A-28 PRELIMINARY ;**Variables included from flash algorithms. .include ”svar20.h” ;Variable declarations .ref GCLR ;References clear algo. .ref GPGMJ ;References program algo. .ref GERS ;References erase algo. .ref FLWS ;References flash–write algo. ;**Parameters used by flash algorithms. . ...

  • Texas Instruments TMS320F20x/F24x DSP - page 81

    C-Callable Interface to Flash Algorithms PRELIMINARY A-29 Assembly Source Listings and Program Examples PRELIMINARY * passes, the flash is ready to be reprogrammed. The * * operations are performed on the segments of the flash * * module described by the parameter list: * * 1)PROTECT–defines which flash segments to protect.* * 2)SEG_ST –start a ...

  • Texas Instruments TMS320F20x/F24x DSP - page 82

    C-Callable Interface to Flash Algorithms PRELIMINARY A-30 PRELIMINARY ADD #1 ;Increment fail count. SACL ERS_COUNT ;Save new count. SUB #10 ;CHECK for max of 10. BCND ers_error,GT ;If ers_cout>10 then hard fail. CALL FLWS ;Else, try to recover from depletion. LACL ERROR ;Check for FLASH–WRITE error. BCND ers_error,neq ;If couldn’t recover, t ...

  • Texas Instruments TMS320F20x/F24x DSP - page 83

    C-Callable Interface to Flash Algorithms PRELIMINARY A-31 Assembly Source Listings and Program Examples PRELIMINARY ;Begin C Preprocessing POPD *+ ; pop return address, push on s/w stack sar ar0,*+ ; save FP sar ar6,* ; save ar6 sbrk #3 ; Local variables (and parameters) are set up as follows: ; ;get arguments and place them properly – take them ...

  • Texas Instruments TMS320F20x/F24x DSP - page 84

    Sample Assembly Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-32 PRELIMINARY A.3 Sample Assembly Code to Erase and Reprogram the TMS320F206 The algorithm files can be used from assembly in a straightforward manner . In general, the algorithms can reside anywhere in program space. However , the algorithms cannot be executed from the flash ...

  • Texas Instruments TMS320F20x/F24x DSP - page 85

    Sample Assembly Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-33 Assembly Source Listings and Program Examples PRELIMINARY ;data section used for * ;temporary variables, and * ;for passing parameters * ;to the flash algorithms. * ********************************************************* PROTECT .set PARMS ;Segment enable bits. * ******** ...

  • Texas Instruments TMS320F20x/F24x DSP - page 86

    Sample Assembly Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-34 PRELIMINARY SUB #10 ;CHECK for max of 10. BCND ers_error,GT ;If ers_cout>10 then hard ;fail. CALL FLWS ;Else, try to recover from ;depletion. LACL ERROR ;Check for FLASH–WRITE error. BCND ers_error,neq ;If couldn’t recover, then ;hard fail. B ers_loop ;Else, try eras ...

  • Texas Instruments TMS320F20x/F24x DSP - page 87

    Sample Assembly Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-35 Assembly Source Listings and Program Examples PRELIMINARY prg_error: ******************************************************** ** If here, then an error has occurred during ** ** programming. In an actual application, the system ** ** takes some action to indicate that servi ...

  • Texas Instruments TMS320F20x/F24x DSP - page 88

    Sample Assembly Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-36 PRELIMINARY PAGE 1: /* DM – Data memory */ BLK_B2: origin = 0x60,length = 0x20 /*BLOCK B2 */ DSARAM: origin = 0xc00, length = 0xC00 /*Use 3K of SARAM for data DON=1 */ EX1_DM: origin = 0x4000, length = 0x4000 /*External data RAM */ B1: origin = 0x300, length = 0x1ff /*B1 ...

  • Texas Instruments TMS320F20x/F24x DSP - page 89

    Sample C Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-37 Assembly Source Listings and Program Examples PRELIMINARY A.4 Sample C Code to Erase and Reprogram the TMS320F206 Because the algorithm implementations do not follow the C-calling convention of the ’C2000 C environment, they cannot be used directly from C. The assem- bly code of ...

  • Texas Instruments TMS320F20x/F24x DSP - page 90

    Sample C Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-38 PRELIMINARY { /*Flash fails programming, EXIT*/ while(1){} /*Spin here forever*/ } } else { /*Flash fails erase, EXIT*/ while(1){} /*Spin here forever*/ } } A.4.2 Linker Command File for TMS320F206 Sample C Code /******************************************************************** ...

  • Texas Instruments TMS320F20x/F24x DSP - page 91

    Sample C Code to Erase and Reprogram the TMS320F206 PRELIMINARY A-39 Assembly Source Listings and Program Examples PRELIMINARY FLASH0: origin = 0x0000, length = 0x3fff FLASH1: origin = 0x4000, length = 0x3fff PSARAM: origin = 0x8000, length = 0x400 /*Use 1K of SARAM for PROGRAM*/ B0: origin = 0xff00, length = 0x1ff PAGE 1: /* DM – Data memory */ ...

  • Texas Instruments TMS320F20x/F24x DSP - page 92

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-40 PRELIMINARY A.5 Sample Assembly Code to Erase and Reprogram the TMS320F240 The algorithm files can be used from assembly in a straightforward manner . In general, the algorithms can reside anywhere in program space. However , the algorithms cannot be executed from the flash ...

  • Texas Instruments TMS320F20x/F24x DSP - page 93

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-41 Assembly Source Listings and Program Examples PRELIMINARY ;**Variables included from flash algorithms. .include ”svar20.h” ;Variable declarations .ref GCLR ;References clear algo. .ref GPGMJ ;References program algo. .ref GERS ;References erase algo. .ref FLWS ;Referenc ...

  • Texas Instruments TMS320F20x/F24x DSP - page 94

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-42 PRELIMINARY F240INIT: ;Set Data Page pointer to page 1 of the ;peripheral frame LDP #DP_PF1 ;Page DP_PF1 includes WET through * ;EINT frames ;initialize WDT registers SPLK #06Fh, WDCR ;clear WDFLAG, Disable WDT ;(if Vpp=5V), set WDT ;for 1 second overflow (max) SPLK #07h, R ...

  • Texas Instruments TMS320F20x/F24x DSP - page 95

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-43 Assembly Source Listings and Program Examples PRELIMINARY depletion: LACL ERS_COUNT ;Get erase fail count. ADD #1 ;Increment fail count. SACL ERS_COUNT ;Save new count. SUB #10 ;CHECK for max of 10. BCND ers_error,GT ;If ers_cout>10 then hard fail. CALL FLWS ;Else, try t ...

  • Texas Instruments TMS320F20x/F24x DSP - page 96

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-44 PRELIMINARY ************************************************************** ** Now that the data to be programmed is ready, the ** ** programming algorithm is invoked. Note: Four parameters ** ** must be initialized before calling the algorithm. ** ************************** ...

  • Texas Instruments TMS320F20x/F24x DSP - page 97

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-45 Assembly Source Listings and Program Examples PRELIMINARY A.5.2 Linker Command File for TMS320F240 Sample Assembly Code /************************************************************/ /* Filename: ASMEXA24.CMD */ /* Description: Linker command file for ’F240 example of */ ...

  • Texas Instruments TMS320F20x/F24x DSP - page 98

    Sample Assembly Code to Erase and Reprogram the TMS320F240 PRELIMINARY A-46 PRELIMINARY /*All these sections are for flash programming.*/ fl_prg : {} > EXTRAM PAGE 0 /**Programming Algorithm*****/ fl_clr : {} > EXTRAM PAGE 0 /******Clear Algorithm*******/ fl_ers : {} > EXTRAM PAGE 0 /******Erase Algorithm*******/ fl_wrt : {} > EXTRAM PA ...

  • Texas Instruments TMS320F20x/F24x DSP - page 99

    Using the Algorithms With C Code to Erase and Reprogram the ’F240 PRELIMINARY A-47 Assembly Source Listings and Program Examples PRELIMINARY A.6 Using the Algorithms With C Code to Erase and Reprogram the ’F240 Because the algorithm implementations do not follow the C-calling convention of the ’C2000 C environment, they cannot be used directl ...

  • Texas Instruments TMS320F20x/F24x DSP - page 100

    Using the Algorithms With C Code to Erase and Reprogram the ’F240 PRELIMINARY A-48 PRELIMINARY extern int erase(); /* Declare external func for flash erase. */ extern int program(); /* Declare external func for flash programming */ extern c240init(); /* Declare external func for C240 register init’l’n */ extern wdtoff(); /* Declare external f ...

  • Texas Instruments TMS320F20x/F24x DSP - page 101

    Using the Algorithms With C Code to Erase and Reprogram the ’F240 PRELIMINARY A-49 Assembly Source Listings and Program Examples PRELIMINARY /************************Command Line Options**************************/ –cr /*Use Ram init model. */ –heap 0x0 /*No heap needed for this example. */ –stack 0x96 /*150 word stack is enough for this exa ...

  • Texas Instruments TMS320F20x/F24x DSP - page 102

    Using the Algorithms With C Code to Erase and Reprogram the ’F240 PRELIMINARY A-50 PRELIMINARY .bss :{} > B1 PAGE 1 .cinit :{} > B1 PAGE 1 .const : load = EXTRAM PAGE 0, run = DSRAM PAGE 1 { /* GET RUN ADDRESS */ __const_run = .; /* MARK LOAD ADDRESS */ *(.c_mark) /* ALLOCATE .const */ *(.const) /* COMPUTE LENGTH */ __const_length = .– __ ...

  • Texas Instruments TMS320F20x/F24x DSP - page 103

    Using the Algorithms With C Code to Erase and Reprogram the ’F240 PRELIMINARY A-51 Assembly Source Listings and Program Examples PRELIMINARY OR #06fh ; set WDDIS bit and WDCHK2:0 bits, WDCLK to max. SACL WDCR ; write ACC out to WDTCR ***************************************************************************** * Step 9. Deallocate the local frame ...

  • Texas Instruments TMS320F20x/F24x DSP - page 104

    Using the Algorithms With C Code to Erase and Reprogram the ’F240 PRELIMINARY A-52 PRELIMINARY * Step 5. begin code that will initialize the ’240 registers * ***************************************************************************** CLRC SXM ; Clear Sign Extension Mode CLRC OVM ; Reset Overflow Mode * Set Data Page pointer to page 1 of the p ...

  • Texas Instruments TMS320F20x/F24x DSP - page 105

    Index PRELIMINARY Index-1 PRELIMINARY Index A access modes code for changing A-25 array access 2-5, 2-10, 2-1 1, 2-16, 3-8 register access 2-5, 2-10, 2-1 1, 3-1 1 access–control register 2-5 to 2-7 modifying in TMS320F206 2-6 modifying in TMS320F24x 2-7 reading in TMS320F206 2-6 accessing the flash module 2-5 address complementing 3-1 1 algorithm ...

  • Texas Instruments TMS320F20x/F24x DSP - page 106

    Index PRELIMINARY Index-2 PRELIMINARY erase algorithm assembly code (SERA2x.ASM) A-10 described 3-10 to 3-13 flow diagram 3-13 in overall flow 3-10 erase() function (C code listing) A-27 erase operation described 2-14 following flash–write operation 2-15 frequency range 3-12 logic levels 2-4 role of WDA T A 2-1 1 VER1 read mode 2-12 verification ...

  • Texas Instruments TMS320F20x/F24x DSP - page 107

    Index PRELIMINARY Index-3 PRELIMINARY M margin determining 3-5, 3-1 1 ensuring data retention 1-2 improving 3-12 in programming 2-13 restoring after flash–write operation 2-15 special read modes for ensuring 2-12 masking data in program operation 3-8 memory maps 1-4 MODE bit 2-6 See also flash access–control register mode selection for access 2 ...

  • Texas Instruments TMS320F20x/F24x DSP - page 108

    Index PRELIMINARY Index-4 PRELIMINARY subroutines used by all algorithms (SU- TILS2x.ASM) A-25 SUTILS2x.ASM file (code for subroutines) A-25 SV AR2x.H file (header file for constants and vari- ables) A-2 T test register (TST) 2-6, 2-8, 2-10 U uniformity of charge 3-5, 3-9 unintentional erasure, protection 2-16 using the algorithms with assembly cod ...

Manufacturer Texas Instruments Category Computer Drive

Documents that we receive from a manufacturer of a Texas Instruments TMS320F20x/F24x DSP can be divided into several groups. They are, among others:
- Texas Instruments technical drawings
- TMS320F20x/F24x DSP manuals
- Texas Instruments product data sheets
- information booklets
- or energy labels Texas Instruments TMS320F20x/F24x DSP
All of them are important, but the most important information from the point of view of use of the device are in the user manual Texas Instruments TMS320F20x/F24x DSP.

A group of documents referred to as user manuals is also divided into more specific types, such as: Installation manuals Texas Instruments TMS320F20x/F24x DSP, service manual, brief instructions and user manuals Texas Instruments TMS320F20x/F24x DSP. Depending on your needs, you should look for the document you need. In our website you can view the most popular manual of the product Texas Instruments TMS320F20x/F24x DSP.

A complete manual for the device Texas Instruments TMS320F20x/F24x DSP, how should it look like?
A manual, also referred to as a user manual, or simply "instructions" is a technical document designed to assist in the use Texas Instruments TMS320F20x/F24x DSP by users. Manuals are usually written by a technical writer, but in a language understandable to all users of Texas Instruments TMS320F20x/F24x DSP.

A complete Texas Instruments manual, should contain several basic components. Some of them are less important, such as: cover / title page or copyright page. However, the remaining part should provide us with information that is important from the point of view of the user.

1. Preface and tips on how to use the manual Texas Instruments TMS320F20x/F24x DSP - At the beginning of each manual we should find clues about how to use the guidelines. It should include information about the location of the Contents of the Texas Instruments TMS320F20x/F24x DSP, FAQ or common problems, i.e. places that are most often searched by users in each manual
2. Contents - index of all tips concerning the Texas Instruments TMS320F20x/F24x DSP, that we can find in the current document
3. Tips how to use the basic functions of the device Texas Instruments TMS320F20x/F24x DSP - which should help us in our first steps of using Texas Instruments TMS320F20x/F24x DSP
4. Troubleshooting - systematic sequence of activities that will help us diagnose and subsequently solve the most important problems with Texas Instruments TMS320F20x/F24x DSP
5. FAQ - Frequently Asked Questions
6. Contact detailsInformation about where to look for contact to the manufacturer/service of Texas Instruments TMS320F20x/F24x DSP in a specific country, if it was not possible to solve the problem on our own.

Do you have a question concerning Texas Instruments TMS320F20x/F24x DSP?

Use the form below

If you did not solve your problem by using a manual Texas Instruments TMS320F20x/F24x DSP, ask a question using the form below. If a user had a similar problem with Texas Instruments TMS320F20x/F24x DSP it is likely that he will want to share the way to solve it.

Copy the text from the picture

Comments (0)