Motorola M68EZ328ADS user manual Executing Program Command Sequence

Page 35

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

Image 35
Contents Preliminary Freescale Semiconductor, IncTable of Contents Programming On-board Flash Memory Appendix aComparison of M68EZ328ADS Version 1.x Resistive Touch Panel OperationIii M68EZ328ADS v2.0 USER’S Manual List of Illustrations List of Tables Introduction FeaturesSection General Information Debugger Related DocumentationTechnical Support 1.4.1 M68EZ328ADS Equipments Required Section Quick Installation GuideInstallation Procedure OverviewM68EZ328ADS v2.0 Key Component Layout DIP Switch Options for SDS monitor Default DIP Switch Options for Metrowerks monitorMetrowerks Codewarrior Connecting M68EZ328ADS v2.0 to PCInstalling software debugger Select ADS68EZ328 Stationery for new project Change the connection settings in the Debug Settings Windows Debug Pop-Up Window of SDS Connection Setting inside Debug Pop-up Window of SDS Section Hardware Description and Board Operation M68EZ328ADS v2.0 Functional Block DiagramDIP Switch pack S2 Setting Control SwitchesDIP Switches DIP Switch pack S1 SettingOperation Modes LED IndicatorsOperation Mode Setting Function of LED IndicatorsFlash Memory M68VZ328ADS v2.0 Default Memory MapMemory Memory MapInterface of EMU ROM EMU ROMMC68EZ328 CSD1 EDO DramMC68VZ328 Uart and IrdaLCD Interface LCD and Touch Panel InterfaceTouch Panel Interface Signal Assignment for Touch Panel ControllerLogic Analyzer Interface Expansion ConnectorsSingle Tone Generator Pin Assignments of P4 Power SupplyGND VEE Software Table A-2. Software Change for using M68EZ328ADSAppendix a Comparison of M68EZ328ADS Version 1.X HardwareFreescale Semiconductor, Inc General Concepts of Resistive Panels Appendix B Resistive Touch Panel OperationDetermination of X,Y Position Elements for Programming the Flash Appendix C Programming ON-BOARD Flash MemoryOffset Address of ROM Image MethodExecuting Program Command Sequence NOW Echo Program EnableError PollingFinish Txdrdy ProgramVerifiy NOV EchoEND BootstrapError Echo Figure C-2. Flash Program Algorithm Freescale Semiconductor, Inc Appendix D Monitor Initialization Code Initialization Code of Metrowerks Monitor RESET.SMonitor Initialization Code Freescale Semiconductor, Inc Lcxp Reset OptionsLxmax Lymax#$08,ICEMCR #$9,PGSEL#MONSTACKTOP,A7 #0,RTCWDInitialization Code of SDS Monitor MONITOR.H Equ M328BASE+$150 PWM RegistersARCHIVED by Freescale SEMICONDUCTOR, INC Baseout Addressing OptionsDevice Options BaseinStoplevel AcrvalIrqmask Interrupt Behavior OptionsMonstacktop UsrresetResethard #$7,ICEMSR#0,PCPDEN #$0000,GRPBASED#0,PCSEL Other Definitions BASEIN+OFF6BASEIN+OFF7 ACREndmARCHIVED by Freescale SEMICONDUCTOR, INC Freescale Semiconductor, Inc M68EZ328ADS Appendix E SchematicsM68EZ328ADS By Freescale SEMICONDUCTOR, INC Memory LCD Screen IncUart Ports FreescaleIrDA Reset Circuit Misc Logic Analyzer Connectors Test pin & VME connector