c2xx_bex.lst
来自「本测试程序是针对TMS320LF2407 EVM的性能测试而设计开发的。程序运行」· LST 代码 · 共 402 行 · 第 1/2 页
LST
402 行
180 ; since no program routine exists in
181 ; ; this file, the ERASE file.
182 ; F**************************************************************************
183 ; Name: PRG_erase
184 ;
185 ; Description
186 ; Erase a programmed device. This module will be executed if the PRG2xxw
187 ; command line option specified is -e.
188 ; Inputs
189 ; None:
190 ;
191 ; Outputs
192 ; int PRG_status Pass =0; Fail = 1;
193 ;
194 ; Notes:
195 ; The erase is device specific.
196 ; F**************************************************************************
197
198 0009 PRG_erase:
199 0009 7a80 CALL INIT_DEVICE
000a 0056+
200
201 000b SECTOR_0:
202 000b bc00+ LDP #PRG_options ;GET THE SECTOR MASK
203 000c 1003+ LACC PRG_options ;
204 000d bfb0 AND #000Fh ;MASK OUT UNWANTED BITS.
000e 000f
205 000f be0a SFR ;GET BIT0
206 0010 9003+ SACL PRG_options ;STORE OTHER BITS BACK.
207 0011 e301 BCND SECTOR_1,NC ;IF BIT0 IS SET, THEN ERASE SECTOR0.
0012 001c+
208
209 0013 bc00 LDP #0
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sun May 6 00:03:21 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
c2xx_bex.asm PAGE 5
210 0014 ae68 SPLK #0000h,FL_SECST ;FIRST ADDRESS OF FLASH SEGMENT **
0015 0000
211 0016 ae69 SPLK #0FFFh,FL_SECEND ;LAST ADDRESS IN FLASH SEGMENT **
0017 0fff
212 0018 ae70 SPLK #1,SECTOR ;MASTER SECTOR KEY **
0019 0001
213 001a 7a80 CALL ERASE ;ERASE SECTOR 1 **
001b 0000+
214
215 001c SECTOR_1
216 001c bc00+ LDP #PRG_options ;GET THE SECTOR MASK
217 001d 1003+ LACC PRG_options ;
218 001e be0a SFR ;GET BIT0
219 001f 9003+ SACL PRG_options ;STORE OTHER BITS BACK.
220 0020 e301 BCND SECTOR_2,NC ;IF BIT0 IS SET, THEN ERASE SECTOR1.
0021 002b+
221
222 0022 bc00 LDP #0
223 0023 ae68 SPLK #01000h,FL_SECST ;FIRST ADDRESS OF FLASH SEGMENT **
0024 1000
224 0025 ae69 SPLK #03FFFh,FL_SECEND ;LAST ADDRESS IN FLASH SEGMENT **
0026 3fff
225 0027 ae70 SPLK #2,SECTOR ;SECTOR KEY **
0028 0002
226 0029 7a80 CALL ERASE ;ERASE SECTOR 2 **
002a 0000+
227
228 002b SECTOR_2
229 ; **
230 002b bc00+ LDP #PRG_options ;GET THE SECTOR MASK
231 002c 1003+ LACC PRG_options ;
232 002d be0a SFR ;GET BIT0
233 002e 9003+ SACL PRG_options ;STORE OTHER BITS BACK.
234 002f e301 BCND SECTOR_3,NC ;IF BIT0 IS SET, THEN ERASE SECTOR1.
0030 003a+
235
236 0031 bc00 LDP #0 ; **
237 0032 ae68 SPLK #4000h,FL_SECST ;FIRST ADDRESS OF FLASH SEGMENT **
0033 4000
238 0034 ae69 SPLK #06FFFh,FL_SECEND ;LAST ADDRESS IN FLASH SEGMENT **
0035 6fff
239 0036 ae70 SPLK #4,SECTOR ;SECTOR KEY **
0037 0004
240 0038 7a80 CALL ERASE ;CLEAR SECTOR 2 **
0039 0000+
241 ; **
242 003a SECTOR_3
243 003a bc00+ LDP #PRG_options ;GET THE SECTOR MASK
244 003b 1003+ LACC PRG_options ;
245 003c be0a SFR ;GET BIT0
246 003d 9003+ SACL PRG_options ;STORE OTHER BITS BACK.
247 003e e301 BCND NO_SECTOR,NC ;IF BIT0 IS SET, THEN ERASE SECTOR1.
003f 0049+
248
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sun May 6 00:03:21 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
c2xx_bex.asm PAGE 6
249 0040 bc00 LDP #0
250 0041 ae68 SPLK #07000h,FL_SECST ;FIRST ADDRESS OF FLASH SEGMENT **
0042 7000
251 0043 ae69 SPLK #07FFFh,FL_SECEND ;LAST ADDRESS IN FLASH SEGMENT **
0044 7fff
252 0045 ae70 SPLK #8,SECTOR ;SECTOR KEY **
0046 0008
253 0047 7a80 CALL ERASE ;CLEAR SECTOR 2 **
0048 0000+
254 ;
255
256 0049 NO_SECTOR:
257 0049 bc00+ ldp #PARMS
258 004a ae07+ splk #0,PRG_status; Error in CLEAR or Erase
004b 0000
259 004c 7980 b PRG_stop
004d 0053+
260
261
262
263
264
265 ;
266 ; F**************************************************************************
267 ; Name: PRG_verify
268 ;
269 ; Description
270 ; Verify a block of programmed data. This module will be excuted if the
271 ; command line option in PRG2xxw is -v.
272 ;
273 ; Inputs Defined by host
274 ; unsigned *PRG_paddr Pointer to first address to verify
275 ; unsigned PRG_page Page to verify, Program == 0, Data == 1
276 ; unsigned PRG_length Number of words to verify
277 ; unsigned *PRG_bufaddr Pointer to verify data buffer
278 ;
279 ; Outputs
280 ; int PRG_status Pass =0; Fail = 1;
281 ;
282 ; Notes:
283 ; The PRG_page value is setup by the host but not used in this case.
284 ; The assumption is that the programmable device is in program space.
285 ; F**************************************************************************
286
287 004e PRG_verify:
288 004e err1:
289 004e bc00+ ldp #PARMS
290 004f ae07+ error: splk #1,PRG_status ;
0050 0001
291 0051 7980 b PRG_stop ;Generate a breakpoint
0052 0053+
292
293 ;
294 ; F**************************************************************************
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sun May 6 00:03:21 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
c2xx_bex.asm PAGE 7
295 ; Name: PRG_stop
296 ;
297 ; Description
298 ; Exit routine for all programming functions.
299 ;
300 ; Inputs
301 ; None
302 ;
303 ;
304 ; Outputs
305 ; None
306 ;
307 ; Notes:
308 ; Exit point for all programming functions
309 ; The ESTOP opcode gets executed as a NOP when not in emulation
310 ; mode. The "b $" will keep the program from running off if
311 ; not in emulation mode.
312 ;
313 ; F**************************************************************************
314 0053 PRG_stop:
315
316
317 0053 be90 .word 0BE90h ;SWI instruction
318
319 0054 7980 b $
0055 0054+
320
321
322 0056 INIT_DEVICE
323
324 0056 bce0 LDP #0E0h
325 0057 ae18 SPLK #PLL_RATIO_CONST,7018h
0058 0200
326 0059 ae19 SPLK #000Bh,7019h
005a 000b
327 005b ae29 SPLK #6fh,7029h
005c 006f
328 005d ef00 RET
329
330
331
332
333
334
335 .end
No Errors, No Warnings
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?