Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

Programming On-board Flash Memory

For example, when using SDS’s DOWN.EXE to generate the s-record, the "-w offset" parameter can be used to specify this offset value. Please refer to the SingleStep User

Guide for using this command.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

C.5 EXECUTING PROGRAM COMMAND SEQUENCE

Listed below is the source code of the flash Program which contains the necessary steps to write the flash memory MBM29LV160T. It executes the flash program command sequence and copies the ROM image from RAM area to the Flash memory area on ADS board. Figure C-2shows the flow chart of this program. Different brands of Flash memory may have dif- ferent program command sequences, please refer to their datasheets for more details.

 

 

XREF

STKTOP

 

OFFSET1

 

equ $AAA

 

OFFSET2

 

equ $554

 

TIME

 

equ $FFF

 

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

ECHO

MACRO

CHAR

 

 

 

bsr

TXD_RDY

 

 

nop

 

 

 

 

nop

 

 

 

 

nop

 

 

 

 

move.b

#CHAR,$FFFFF907

 

ENDM

 

 

 

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

ENABLE

MACRO

 

 

 

 

move.w

#$00AA,(A5)

; Unlock Flash

 

move.w

#$0055,(A6)

 

 

move.w

#$00A0,(A5)

 

 

ENDM

 

 

 

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

 

SECTION

parameter

 

pSOURCE

 

DC.L

$00010000

pTARGET

 

DC.L

$01000000

pSIZE

 

DC.L

$00010000

pFLASH

 

DC.L

$01000000

pERROR

 

DC.L

$0

 

pFINISH

 

DC.L

$0

 

pERROR_ADDRESS

DC.L

$0

 

 

 

DC.L

STKTOP

 

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

 

SECTION

code

 

 

START

 

 

 

 

MOVEA.L #STKTOP,a7

;re-istall stack pointer in case bootstrap mode

 

MOVE.L

#0,pERROR

 

 

MOVE.L

#0,pFINISH

 

 

move.l

#0,pERROR_ADDRESS

C-34M68EZ328ADS v2.0 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Page 35
Image 35
Motorola M68EZ328ADS user manual Executing Program Command Sequence