⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 era_alg.lst

📁 DSP F2407 烧写软件
💻 LST
📖 第 1 页 / 共 4 页
字号:
     266 00a2 7980          B       PERASE
         00a3 0059+ 
     267            
     268            ;--------------------------------------------------------------------------------------------------
     269            ;PASSERVER
     270            ;--------------------------------------------------------------------------------------------------
     271            ; This section of code is executed upon successful erase verify.
     272            ; This then
     273            ;       1. Checks to see if compaction verify has passed.
     274            ;       2. If yes, the erase operation is complete for this sector, and the
     275            ;          control is transferred to 'DONE' which finishes up.
     276            ;       3. If not, control is passed to the compaction verify routine.
     277            ;--------------------------------------------------------------------------------------------------
     278 00a4       PASSERVER:
     279            
     280 00a4 bf80          LACC    #CTRL                                       ;Exit the Erase verify mode.
         00a5 0001  
     281 00a6 ae01!         SPLK    #0000,flashAlgoVars.PAD
         00a7 0000  
     282 00a8 a701!         TBLW    flashAlgoVars.PAD
     283            
     284 00a9               SDELAY  #Tevh_C                                     ;Wait in normal mode.
1        00a9 bb3a                  RPT     #Tevh_C
1        00aa 8b00                  NOP
     285            
     286            
     287 00ab 1006!         LACC    flashAlgoVars.LASTVER                       ;Check to see if compaction ver passed.
     288 00ac e308          BCND    DONE,NEQ                                    ;If yes, the erase is complete.
         00ad 0118+ 
     289 00ae 7980          B       CMPCTVER                                    ;else start compaction verify.
         00af 00bd+ 
     290            
     291            ;--------------------------------------------------------------------------------------------------
     292            ;ERROR Error handling
     293            ;--------------------------------------------------------------------------------------------------
     294            ; This section of code is executed upon encountering errors.
     295            ;       1. Clears control registers.
     296            ;       2. Transfers control to an error exit point.
     297            ;--------------------------------------------------------------------------------------------------
     298            
     299 00b0 ae04! ERROR:  SPLK    #6,flashAlgoVars.PAD1                       ; Set up for clearing 6 control regs
         00b1 0006  
     300 00b2 7a80          CALL    CLRCMD                                      ; Call routine to do so.
         00b3 011f+ 
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:10 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
era_alg.asm                                                          PAGE    8

     301 00b4 7980          B       ERROR1
         00b5 003f+ 
     302            
     303            ;--------------------------------------------------------------------------------------------------
     304            ; READWORD
     305            ; This routine performs the following operations
     306            ;    1.    Reads the word at the location pointed to by ADDR.
     307            ;    2.  Stores the word in the variable READ.
     308            ;    3.  Returns to the caller in Register Mode.
     309            ;--------------------------------------------------------------------------------------------------
     310 00b6       READWORD
     311 00b6               ACCESS_ARRAY
1        00b6 af7f                  IN    07fh,0ff0fh
         00b7 ff0f  
     312 00b8 1000!         LACC    flashAlgoVars.ADDR                          ;Read word flash 
     313 00b9 a602!         TBLR    flashAlgoVars.READ                          ;store word in READ (data space)
     314 00ba               ACCESS_REGS
1        00ba 0c7f                  OUT    07fh,0ff0fh        
         00bb ff0f  
     315            
     316 00bc ef00          RET
     317            
     318            ;--------------------------------------------------------------------------------------------------
     319            ; CMPCTVER: 
     320            ;--------------------------------------------------------------------------------------------------
     321            ; This section performs the following functions:
     322            ;   1.  Checks to see if compaction operation is needed.
     323            ;   2.  Calls the compaction routine if needed.
     324            ;--------------------------------------------------------------------------------------------------
     325 00bd       CMPCTVER:
     326 00bd a800!         BLDD    #flashAlgoVars.FL_SECST,flashAlgoVars.ADDR  ;Init ADDR to first location in sector.
         00be 0007! 
     327 00bf ae06!         SPLK    #0deadh,flashAlgoVars.LASTVER               ;Sets the LASTVERIFY flag to indicate
         00c0 dead  
     328                                                                        ;that compaction verify is the last 
     329                                                                        ;verification operation.    
     330            ;G1
     331 00c1 ae05!        SPLK    #MX_CMPCT,flashAlgoVars.PLS_CNT             ;Initialize compaction pulse count.
         00c2 09c4  
     332            ;--------------------------------------------------------------------------------------------------
     333 00c3       CMPCTVER1:
     334 00c3 bf80          LACC    #WADDR                                      ;Setup WADDR to the address to be 
         00c4 0002  
     335 00c5 7a80          CALL    WADDR_SET                                   ;checked for compaction
         00c6 0008+ 
     336            ;--------------------------------------------------------------------------------------------------
     337 00c7 bf80          LACC    #CTRL                                       ;Setup the compaction verify mode.
         00c8 0001  
     338 00c9 ae01!         SPLK    #0006,flashAlgoVars.PAD                     ; 
         00ca 0006  
     339 00cb a701!         TBLW    flashAlgoVars.PAD
     340            ;--------------------------------------------------------------------------------------------------
     341 00cc               SDELAY    #T_cva_cm                                 ;Algorithm Delay ~ 50ns(25ns MIN)     
1        00cc bb0a                  RPT     #T_cva_cm
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:10 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
era_alg.asm                                                          PAGE    9

1        00cd 8b00                  NOP
     342                                                                        ;T_cva(CM)
     343            ;--------------------------------------------------------------------------------------------------
     344 00ce 7a80          CALL    READWORD                                    ;Read out the word in compaction 
         00cf 00b6+ 
     345                                                                        ;verify mode.
     346            ;--------------------------------------------------------------------------------------------------
     347 00d0 6902!         LACL    flashAlgoVars.READ                          ;Get the value read out.
     348 00d1 e308          BCND    PROCEED_TO_CMPCT,NEQ                        ;If this is non-zero there are depleted
         00d2 00e5+ 
     349                                                                        ;bits, and proceed to apply compaction 
     350                                                                        ;pulses
     351            ;--------------------------------------------------------------------------------------------------
     352 00d3 1000!         LACC    flashAlgoVars.ADDR                          ;Increment the current address 
     353 00d4 b801          ADD     #1                                          ;and store it back.
     354 00d5 9000!         SACL    flashAlgoVars.ADDR                          ;
     355            ;--------------------------------------------------------------------------------------------------
     356 00d6 ae05!         SPLK    #MX_CMPCT,flashAlgoVars.PLS_CNT             ;Initialize compaction pulse count.
         00d7 09c4  
     357            ;--------------------------------------------------------------------------------------------------
     358 00d8 ba40          SUB     #STICKS                                     ;Subtract the stick count.
     359 00d9 3007!         SUB     flashAlgoVars.FL_SECST
     360 00da e308          BCND    CMPCTVER1,NEQ                               ; CURRENT ADDR - FL_SECST is the
         00db 00c3+ 
     361                                                                        ; number of sticks checked.
     362                                                                        ; SO CURRENT (ADDR-FL_SECST)-STICKS = 0
     363                                                                        ; on the last stick to be checked.
     364            
     365                                                                        ; If here done compaction check has 
     366                                                                        ; passed. So exit compaction mode
     367            
     368            ;--------------------------------------------------------------------------------------------------
     369 00dc bf80          LACC    #CTRL                                       ;Exit the compaction verify mode.
         00dd 0001  
     370 00de ae01!         SPLK    #0000,flashAlgoVars.PAD
         00df 0000  
     371 00e0 a701!         TBLW    flashAlgoVars.PAD
     372            ;--------------------------------------------------------------------------------------------------
     373 00e1               SDELAY  #Tcvh_CM                                    ; Wait in normal mode
1        00e1 bb3a                  RPT     #Tcvh_CM
1        00e2 8b00                  NOP
     374            ;--------------------------------------------------------------------------------------------------
     375 00e3 7980          B       ERVER
         00e4 0082+ 
     376            ;--------------------------------------------------------------------------------------------------
     377 00e5       PROCEED_TO_CMPCT:
     378            ;--------------------------------------------------------------------------------------------------
     379            
     380 00e5 bf80          LACC    #CTRL                                       ;Exit the compaction verify mode.
         00e6 0001  
     381 00e7 ae01!         SPLK    #0000,flashAlgoVars.PAD
         00e8 0000  
     382 00e9 a701!         TBLW    flashAlgoVars.PAD
     383            
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:10 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
era_alg.asm                                                          PAGE   10

     384            
     385 00ea               SDELAY  #Tcvh_CM                                    ; Wait in normal mode
1        00ea bb3a                  RPT     #Tcvh_CM
1        00eb 8b00                  NOP
     386            
     387            ;--------------------------------------------------------------------------------------------------
     388 00ec 7980          B       CMPCT
         00ed 00ee+ 
     389            ;--------------------------------------------------------------------------------------------------
     390            ; CMPCT: Implementation of the compaction routine, 
     391            ;--------------------------------------------------------------------------------------------------
     392            ; This code applies compaction pulses to the column addressed by flashAlgoVars.ADDR.
     393            ; It applies compaction pulses to the columns which read out as having depleted
     394            ; bits. 
     395            ;--------------------------------------------------------------------------------------------------
     396 00ee       CMPCT:
     397            ;--------------------------------------------------------------------------------------------------
     398            ; DO NOT *EVER* REMOVE COMPACTION - THIS CAN DESTROY THE DEVICE. THIS IS VERY VERY STRICTLY

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -