📄 c2xx_bcx.lst
字号:
172 SPLK #00E3h,PLL_CNTL2 ;PLL_MF = 4.0 =20MHz
173 .endif
174
175 .if (PLL_MF_45 )
176 SPLK #00EDh,PLL_CNTL2 ;PLL_MF = 4.5 =20MHz
177 .endif
178
179 .if (PLL_MF_50 )
180 SPLK #00E4h,PLL_CNTL2 ;PLL_MF = 5.0 =20MHz
181 .endif
182
183 .if (PLL_MF_90 )
184 SPLK #00F5h,PLL_CNTL2 ;PLL_MF = 9.0 =20MHz
185 .endif
186
187 .if (PLL_ENABLE = YES)
188 0007 ae2b SPLK #0081h,PLL_CNTL1 ;Enable PLL, SYSCLK=CLKIN/2 =CPUCLK/2,
0008 0081
189 .else
190 SPLK #0041h,PLL_CNTL1 ;Disable PLL, SYSCLK=CLKIN/2 =CPUCLK/2,
191 .endif
192
193 0009 ae29 SPLK #006Fh, WD_CNTL
000a 006f
194 000b ae25 SPLK #05555h, WD_KEY
000c 5555
195 000d ae25 SPLK #0AAAAh, WD_KEY
000e aaaa
196
197 000f bc00+ ldp #PARMS ; Defines data page
198 0010 ae07+ splk #0,PRG_status
0011 0000
199 0012 7980 b PRG_stop
0013 0039+
200 ;
201 ; F**************************************************************************
202 ; Name: PRG_program
203 ;
204 ; Description
205 ; Transfers a block of data from RAM to Flash/programmable memory
206 ; PRG2xxw will execute this after PRG_init by default. If the command
207 ; line does not have any options -e or -v.
208 ; If the option specified is -e then the execution sequence will be:
209 ; PRG_init > PRG_erase > PRG_program and then PRG_stop
210 ; If the option specified is -v, then the execution sequence will be:
211 ; PRG_init > PRG_program, PRG_verify and then PRG_stop
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:21 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BCX.ASM PAGE 5
212 ; Inputs
213 ; unsigned *PRG_paddr Pointer to first address to program
214 ; unsigned PRG_page Page to program, Program == 0, Data == 1
215 ; unsigned PRG_length Number of words to program
216 ; unsigned *PRG_bufaddr Pointer to program data buffer
217 ;
218 ; Outputs
219 ; int PRG_status Pass =0; Fail = 1;
220 ;
221 ; Notes:
222 ; The PRG_page value is setup by the host but not used in this case.
223 ; The assumption is that the programmable device is in program space.
224 ; F**************************************************************************
225
226 0014 bc00+ PRG_program: ldp #PARMS ;Point to data page
227 ;no calls for Flash algorithms
228 0015 ae07+ err2: splk #1,PRG_status ;Error in Program stage
0016 0001
229 0017 7980 b PRG_stop
0018 0039+
230 ;
231 ; F**************************************************************************
232 ; Name: PRG_erase
233 ;
234 ; Description
235 ; Erase a programmed device. This module will be executed if the PRG2xxw
236 ; command line option specified is -e.
237 ; Inputs
238 ; None:
239 ;
240 ; Outputs
241 ; int PRG_status Pass =0; Fail = 1;
242 ;
243 ; Notes:
244 ; The erase is device specific.
245 ; F**************************************************************************
246
247 0019 PRG_erase:
248 0019 bc00+ LDP #PARMS
249 ***********First Setup to clear flash0************
250 001a 4103+ BIT PRG_options,1 ;Check option reg for Fl0.
251 001b e900 CC GCLR,TC ;If 1 then clear flash0.
001c 0000!
252 *Check for error on flash0 clear.
253 001d 690f LACL ERROR ; Check for CLEAR/ERASE error
254 001e ba01 SUB #1
255 001f e388 BCND err1,eq
0020 0030+
256
257 ***********Next Setup to clear flash1************
258 0021 ae0a+ SPLK #04000h,SEG_ST ;Start with first segment of FL1.
0022 4000
259 0023 ae0b+ SPLK #07FFFh,SEG_END ;End with last segment of FL1.
0024 7fff
260 0025 4003+ BIT PRG_options,0 ;Check option reg for Fl1.
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:21 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BCX.ASM PAGE 6
261 0026 e900 CC GCLR,TC ;If 1 then clear flash1.
0027 0000!
262 *Check for error on flash1 clear.
263 0028 690f LACL ERROR ; Check for CLEAR/ERASE error
264 0029 ba01 SUB #1
265 002a e388 BCND err1,eq
002b 0030+
266 002c ae07+ SPLK #0,PRG_status
002d 0000
267 002e 7980 B PRG_stop
002f 0039+
268 0030 ae07+ err1: SPLK #1,PRG_status ;Error in CLEAR or Erase
0031 0001
269 0032 7980 B PRG_stop
0033 0039+
270
271 ;
272 ; F**************************************************************************
273 ; Name: PRG_verify
274 ;
275 ; Description
276 ; Verify a block of programmed data. This module will be excuted if the
277 ; command line option in PRG2xxw is -v.
278 ;
279 ; Inputs Defined by host
280 ; unsigned *PRG_paddr Pointer to first address to verify
281 ; unsigned PRG_page Page to verify, Program == 0, Data == 1
282 ; unsigned PRG_length Number of words to verify
283 ; unsigned *PRG_bufaddr Pointer to verify data buffer
284 ;
285 ; Outputs
286 ; int PRG_status Pass =0; Fail = 1;
287 ;
288 ; Notes:
289 ; The PRG_page value is setup by the host but not used in this case.
290 ; The assumption is that the programmable device is in program space.
291 ; F**************************************************************************
292
293 0034 PRG_verify:
294 0034 bc00+ ldp #PARMS
295 0035 ae07+ error: splk #1,PRG_status ;
0036 0001
296 0037 7980 b PRG_stop ;Generate a breakpoint
0038 0039+
297
298 ;
299 ; F**************************************************************************
300 ; Name: PRG_stop
301 ;
302 ; Description
303 ; Exit routine for all programming functions.
304 ;
305 ; Inputs
306 ; None
307 ;
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:21 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BCX.ASM PAGE 7
308 ;
309 ; Outputs
310 ; None
311 ;
312 ; Notes:
313 ; Exit point for all programming functions
314 ; The ESTOP opcode gets executed as a NOP when not in emulation
315 ; mode. The "b $" will keep the program from running off if
316 ; not in emulation mode.
317 ;
318 ; F**************************************************************************
319 0039 PRG_stop:
320
321 0039 8b00 nop
322 003a be90 .word 0BE90h ;SWI instruction
323 003b 8b00 nop
324 003c 7980 b $
003d 003c+
325 .end
No Errors, No Warnings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -