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

📄 c2xx_bpx.lst

📁 DSP F2407 烧写软件
💻 LST
📖 第 1 页 / 共 2 页
字号:
     145 000a 7980              b       PRG_stop
         000b 0033+ 
     146            ;
     147            ;*******************************************************************************
     148            ; Name: PRG_program
     149            ; 
     150            ; Description
     151            ;   Transfers a block of data from RAM to Flash/programmable memory
     152            ;   PRG2xxw will execute this after PRG_init by default. If the command
     153            ;   line does not have any options -e or -v.
     154            ;   If the option specified is -e  then the execution sequence will be:
     155            ;   PRG_init > PRG_erase > PRG_program and then PRG_stop
     156            ;   If the option specified is -v, then the execution sequence will be:
     157            ;   PRG_init > PRG_program, PRG_verify and then PRG_stop
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:11 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
c2xx_bpx.asm                                                         PAGE    4

     158            ; Inputs
     159            ;   unsigned *PRG_paddr         Pointer to first address to program
     160            ;   unsigned  PRG_page          Page to program, Program == 0, Data == 1
     161            ;   unsigned  PRG_length        Number of words to program
     162            ;   unsigned *PRG_bufaddr       Pointer to program data buffer
     163            ;
     164            ; Outputs
     165            ;   int PRG_status              Pass =0; Fail = 1;
     166            ;
     167            ; Notes:
     168            ;   The PRG_page value is setup by the host but not used in this case.
     169            ;   The assumption is that the programmable device is in program space.
     170            ;*******************************************************************************
     171             
     172 000c       PRG_program:
     173 000c bce0          LDP     #0E0h
     174 000d ae18          SPLK    #PLL_RATIO_CONST,7018h
         000e 0000  
     175 000f ae19          SPLK    #000bh,7019h
         0010 000b  
     176 0011 ae29      SPLK    #6fh,7029h
         0012 006f  
     177                            
     178 0013 bc00+         ldp     #PARMS              ;Point to data page 
     179 0014 1003+     LACC        PRG_paddr
     180 0015 bc00!         LDP         #flashAlgoVars.FL_SECST
     181 0016 9007!         SACL    flashAlgoVars.FL_SECST                          ;FIRST ADDRESS OF FLASH SEGMENT                 
     182 0017 9000!     SACL    flashAlgoVars.ADDR  ;ADDR -> START OF SECTOR                         
     183            
     184 0018 ae0e!         SPLK    #0fh,flashAlgoVars.SECTOR_CMD               ;SECTOR KEY                                  
         0019 000f  
     185            
     186 001a bc00+         LDP         #PARMS
     187 001b 1000+         LACC    PRG_bufaddr
     188 001c bc00!         LDP         #flashAlgoVars.DATA_PTR     
     189 001d 900b!         SACL    flashAlgoVars.DATA_PTR                  
     190            
     191 001e bc00+         LDP         #PARMS
     192 001f 1005+         LACC    PRG_length
     193 0020 bc00!         LDP         #flashAlgoVars.DATA_PTR     
     194 0021 9008!         SACL    flashAlgoVars.FL_SECEND         ;# OF DATA WORDS IN DATA BLOCK                
     195            
     196 0022 7a80          CALL    PROGRAM_FLASH                           ;PROGRAM SECTOR 1                               
         0023 0000! 
     197            
     198 0024 100f!     LACC    flashAlgoVars.ALGO_STATUS
     199 0025 bc00+     LDP     #PARMS                      
     200 0026 9006+     SACL    PRG_status
     201            
     202 0027 7980      b       PRG_stop
         0028 0033+ 
     203            
     204            
     205            ;*******************************************************************************
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:11 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
c2xx_bpx.asm                                                         PAGE    5

     206            ; Name: PRG_erase
     207            ; 
     208            ; Description
     209            ;   Erase a programmed device. This module will be executed if the PRG2xxw
     210            ;   command line option specified is -e.
     211            ; Inputs
     212            ;   None:
     213            ;
     214            ; Outputs
     215            ;   int PRG_status      Pass =0; Fail = 1;
     216            ;
     217            ; Notes:
     218            ;   The erase is device specific. 
     219            ;*******************************************************************************
     220             
     221 0029       PRG_erase:
     222 0029 bc00+ err1:   ldpk    PRG_status
     223 002a ae06+                 splk    #1,PRG_status; Error in CLEAR or Erase
         002b 0001  
     224 002c 7980          b       PRG_stop
         002d 0033+ 
     225            
     226            ;
     227            ;*******************************************************************************
     228            ; Name: PRG_verify
     229            ; 
     230            ; Description
     231            ;   Verify a block of programmed data. This module will be excuted if the
     232            ;   command line option in PRG2xxw is -v.
     233            ; 
     234            ; Inputs                        Defined by host
     235            ;   unsigned *PRG_paddr         Pointer to first address to verify
     236            ;   unsigned  PRG_page          Page to verify, Program == 0, Data == 1
     237            ;   unsigned  PRG_length        Number of words to verify
     238            ;   unsigned *PRG_bufaddr       Pointer to verify data buffer
     239            ;
     240            ; Outputs
     241            ;   int PRG_status      Pass =0; Fail = 1;
     242            ;
     243            ; Notes:
     244            ;   The PRG_page value is setup by the host but not used in this case.
     245            ;   The assumption is that the programmable device is in program space.
     246            ;*******************************************************************************
     247             
     248 002e       PRG_verify:
     249 002e bc00+                 ldp     #PARMS
     250 002f ae06+ err2:           splk    #1,PRG_status   ;
         0030 0001  
     251 0031 7980                  b       PRG_stop        ;Generate a breakpoint
         0032 0033+ 
     252            
     253            ;*******************************************************************************
     254            ; Name: PRG_stop
     255            ; 
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:11 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
c2xx_bpx.asm                                                         PAGE    6

     256            ; Description
     257            ;       Exit routine for all programming functions.
     258            ; 
     259            ; Inputs
     260            ;       None
     261            ;
     262            ;
     263            ; Outputs
     264            ;       None
     265            ;
     266            ; Notes:
     267            ;       Exit point for all programming functions
     268            ;       The ESTOP opcode gets executed as a NOP when not in emulation
     269            ;       mode.  The "b $" will keep the program from running off if
     270            ;       not in emulation mode.
     271            ;
     272            ;*******************************************************************************
     273 0033       PRG_stop:
     274            
     275 0033 8b00          nop
     276 0034 be90          .word   0BE90h                  ;SWI instruction
     277 0035 8b00          nop
     278 0036 7980          b $
         0037 0036+ 
     279                            .end

 No Errors,  No Warnings

⌨️ 快捷键说明

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