📄 c2xx_bcx.lst
字号:
0002 0000
148 0003 ae19 SPLK #000bh,7019h
0004 000b
149 0005 ae29 SPLK #6fh,7029h
0006 006f
150
151 0007 bc00+ ldp #PARMS ; Defines data page
152 0008 ae07+ splk #0,PRG_status
0009 0000
153 000a 7980 b PRG_stop
000b 0028+
154 ;
155 ;------------------------------------------------------------------------------
156 ; Name: PRG_program
157 ;
TMS320C24xx COFF Assembler Version 7.02 Tue Jul 29 10:56:09 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
c2xx_bcx.asm PAGE 4
158 ; Description
159 ; Transfers a block of data from RAM to Flash/programmable memory
160 ; PRG2xxw will execute this after PRG_init by default. If the command
161 ; line does not have any options -e or -v.
162 ; If the option specified is -e then the execution sequence will be:
163 ; PRG_init > PRG_erase > PRG_program and then PRG_stop
164 ; If the option specified is -v, then the execution sequence will be:
165 ; PRG_init > PRG_program, PRG_verify and then PRG_stop
166 ; Inputs
167 ; unsigned *PRG_paddr Pointer to first address to program
168 ; unsigned PRG_page Page to program, Program == 0, Data == 1
169 ; unsigned PRG_length Number of words to program
170 ; unsigned *PRG_bufaddr Pointer to program data buffer
171 ;
172 ; Outputs
173 ; int PRG_status Pass =0; Fail = 1;
174 ;
175 ; Notes:
176 ; The PRG_page value is setup by the host but not used in this case.
177 ; The assumption is that the programmable device is in program space.
178 ;------------------------------------------------------------------------------
179
180 000c bc00+ PRG_program: ldp #PARMS ;Point to data page
181 ;no calls for Flash algorithms
182
183 000d ae07+ err2: splk #1,PRG_status ;Error in Program stage
000e 0001
184 000f 7980 b PRG_stop
0010 0028+
185 ;
186 ;------------------------------------------------------------------------------
187 ; Name: PRG_erase
188 ;
189 ; Description
190 ; Erase a programmed device. This module will be executed if the PRG2xxw
191 ; command line option specified is -e.
192 ; Inputs
193 ; None:
194 ;
195 ; Outputs
196 ; int PRG_status Pass =0; Fail = 1;
197 ;
198 ; Notes:
199 ; The erase is device specific.
200 ;------------------------------------------------------------------------------
201 0011 PRG_erase:
202
203 0011 bce0 LDP #0E0h ;Setup DP
204 0012 ae18 SPLK #PLL_RATIO_CONST,7018h ;Set up PLL mult.
0013 0000
205 0014 ae19 SPLK #000bh,7019h ;Set up SCSR2.BRL=0,MC/=0,PON=1,DON=1
0015 000b
206 0016 ae29 SPLK #6fh,7029h ;Stop watchdog.
0017 006f
TMS320C24xx COFF Assembler Version 7.02 Tue Jul 29 10:56:09 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
c2xx_bcx.asm PAGE 5
207
208 0018 CALL_CLEAR:
209 0018 bc00+ LDP #PRG_options ;Get sector command from cmd line.
210 0019 1003+ LACC PRG_options ;
211
212 001a bc00! LDP #flashAlgoVars.SECTOR_CMD ; Store it in SECTOR_MASK.
213 001b 900e! SACL flashAlgoVars.SECTOR_CMD
214
215 001c 7a80 CALL CLEAR_FLASH
001d 0000!
216
217 001e CHECK_ERROR:
218 001e 100f! LACC flashAlgoVars.ALGO_STATUS ; Get the algo error code.
219 001f bc00+ LDP #PRG_status
220 0020 9007+ SACL PRG_status ; Copy the error back to the variable
221 ; which prg2xx looks at.
222 0021 7980 b PRG_stop
0022 0028+
223
224 ;
225 ;------------------------------------------------------------------------------
226 ; Name: PRG_verify
227 ;
228 ; Description
229 ; Verify a block of programmed data. This module will be excuted if the
230 ; command line option in PRG2xxw is -v.
231 ; s
232 ; Inputs Defined by host
233 ; unsigned *PRG_paddr Pointer to first address to verify
234 ; unsigned PRG_page Page to verify, Program == 0, Data == 1
235 ; unsigned PRG_length Number of words to verify
236 ; unsigned *PRG_bufaddr Pointer to verify data buffer
237 ;
238 ; Outputs
239 ; int PRG_status Pass =0; Fail = 1;
240 ;
241 ; Notes:
242 ; The PRG_page value is setup by the host but not used in this case.
243 ; The assumption is that the programmable device is in program space.
244 ;------------------------------------------------------------------------------
245
246 0023 PRG_verify:
247 0023 bc00+ ldp #PARMS
248 0024 ae07+ error: splk #1,PRG_status ;
0025 0001
249 0026 7980 b PRG_stop ;Generate a breakpoint
0027 0028+
250
251 ;
252 ;------------------------------------------------------------------------------
253 ; Name: PRG_stop
254 ;
255 ; Description
256 ; Exit routine for all programming functions.
TMS320C24xx COFF Assembler Version 7.02 Tue Jul 29 10:56:09 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
c2xx_bcx.asm PAGE 6
257 ;
258 ; Inputs
259 ; None
260 ;
261 ;
262 ; Outputs
263 ; None
264 ;
265 ; Notes:
266 ; Exit point for all programming functions
267 ; The ESTOP opcode gets executed as a NOP when not in emulation
268 ; mode. The "b $" will keep the program from running off if
269 ; not in emulation mode.
270 ;
271 ;------------------------------------------------------------------------------
272 0028 PRG_stop:
273
274 0028 8b00 nop
275 0029 be90 .word 0BE90h ;SWI instruction
276 002a 8b00 nop
277 002b 7980 b $
002c 002b+
278 .end
No Errors, No Warnings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -