Texas Instruments TMS320F20x/F24x DSP manual Preliminary, Assembly Source for Algorithms, A-20

Models: TMS320F20x/F24x DSP

1 108
Download 108 pages 2.5 Kb
Page 72
Image 72
A-20

Assembly Source for Algorithms

PRELIMINARY

* bits. For example, if the flash is programmed using a

*

* CLKOUT period of 50 ns, the flash can be reliably read

*

*

back over the CLKOUT period range of 50

ns to 150 ns

*

*

(6.67MHz±20 MHz). The programming pulse

duration is

*

* 100 us, and a maximum of 150 pulses is applied per row. *

*

 

 

*

* The following variables are used for temp storage:

*

*

AR0

Used for comparisons

*

*

AR1

Used for pgm pulse count

*

*

AR2

Used for row banz loop

*

*

AR3

Used for buffer addr index

*

*

AR4

Used for flash address.

*

*

AR6

Parameter passed to Delay

*

*

SPAD1

Flash program and STOP commands

*

*

SPAD2

Flash program + EXE command

*

*

FL_ADRS

Used for flash address

*

*

FL_DATA

Used for flash data

*

*

BASE_0

Used for row±done flag

*

*

BASE_1

Used for row start address

*

*

BASE_2

Used for row length±1

*

*

BASE_3

Used for buffer/row start addr

*

*

BASE_4

Used for destination end addr

*

*

BASE_5

Used for byte mask

*

*************************************************************

.include

ºsvar20.hº

*

 

 

 

MAX_PGM

.set

150

;Allow only 150 pulses per row.

VER0

.set

010h

;VER0 command.

WR_CMND

.set

4

;Write command.

WR_EXE

.set

045h

;Write EXEBIN command.

STOP

.set

0

;Reset command.

 

.def

GPGMJ

 

 

.ref

PRG_bufaddr,PRG_length,PRG_paddr

 

.ref

PROTECT,DELAY,REGS,ARRAY

 

.sect

ºfl_prgº

*********************************************************

* GPGMJ: This routine programs all or part of

*

*

the flash as specified by the variables:

*

*

PRG_paddr

Destination start address

*

*

PRG_length

Source buffer length

*

*

PRG_bufaddr

Buffer start address

*

*

 

 

 

*

* The following variables are used for temp

*

*

storage:

 

 

*

*

AR0

Used for comparisons

*

*

AR1

Used for pgm pulse count

*

*

AR2

Used for row banz loop

*

*

AR3

Used for buffer addr index

*

*

FL_ADRS

Used for flash address

*

*

FL_DATA

Used for flash data

*

*

BASE_0

Used for row±done flag

*

*

BASE_1

Used for row start address

*

*

BASE_2

Used for row length±1

*

A-20

PRELIMINARY

Page 72
Image 72
Texas Instruments TMS320F20x/F24x DSP manual Preliminary, Assembly Source for Algorithms, A-20