📄 c2xx_bex.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_BEX.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 erase flash0************
250 001a 4103+ BIT PRG_options,1 ;Check option reg for Fl0.
251 001b e900 CC GERS,TC ;If 1 then erase flash0.
001c 0000!
252 *Check for error on flash0 erase.
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 erase flash0************
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_BEX.ASM PAGE 6
261 0026 e900 CC GERS,TC ;If 1 then erase flash1.
0027 0000!
262 *Check for error on flash1 erase.
263 0028 690f LACL ERROR ; Check for CLEAR/ERASE error
264 0029 ba01 SUB #1
265 002a e388 BCND err1,EQ
002b 0030+
266
267 002c ae07+ SPLK #0,PRG_status
002d 0000
268 002e 7980 B PRG_stop
002f 0039+
269 0030 ae07+ err1: splk #1,PRG_status; Error in CLEAR or Erase
0031 0001
270 0032 7980 b PRG_stop
0033 0039+
271
272 ;
273 ; F**************************************************************************
274 ; Name: PRG_verify
275 ;
276 ; Description
277 ; Verify a block of programmed data. This module will be excuted if the
278 ; command line option in PRG2xxw is -v.
279 ;
280 ; Inputs Defined by host
281 ; unsigned *PRG_paddr Pointer to first address to verify
282 ; unsigned PRG_page Page to verify, Program == 0, Data == 1
283 ; unsigned PRG_length Number of words to verify
284 ; unsigned *PRG_bufaddr Pointer to verify data buffer
285 ;
286 ; Outputs
287 ; int PRG_status Pass =0; Fail = 1;
288 ;
289 ; Notes:
290 ; The PRG_page value is setup by the host but not used in this case.
291 ; The assumption is that the programmable device is in program space.
292 ; F**************************************************************************
293
294 0034 PRG_verify:
295 0034 bc00+ ldp #PARMS
296 0035 ae07+ error: splk #1,PRG_status ;
0036 0001
297 0037 7980 b PRG_stop ;Generate a breakpoint
0038 0039+
298
299 ;
300 ; F**************************************************************************
301 ; Name: PRG_stop
302 ;
303 ; Description
304 ; Exit routine for all programming functions.
305 ;
306 ; Inputs
307 ; None
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:21 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BEX.ASM PAGE 7
308 ;
309 ;
310 ; Outputs
311 ; None
312 ;
313 ; Notes:
314 ; Exit point for all programming functions
315 ; The ESTOP opcode gets executed as a NOP when not in emulation
316 ; mode. The "b $" will keep the program from running off if
317 ; not in emulation mode.
318 ;
319 ; F**************************************************************************
320 0039 PRG_stop:
321
322 0039 8b00 nop
323 003a be90 .word 0BE90h ;SWI instruction
324 003b 8b00 nop
325 003c 7980 b $
003d 003c+
326 .end
No Errors, No Warnings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -