Motorola M68EZ328ADS Program, Verifiy, NOV Echo, Finish Txdrdy, Polltxd, Lprdy, Echo P Echo a

Page 37

Freescale Semiconductor, Inc.

Programming On-board Flash Memory

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

cmp.l

d0,d1

; if d1<=d0, bra PROGRAM

ble

PROGRAM

 

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

;*****************************************

;Input Parameters:

;a0 - (Long) Source Address

;a1 - (Long) Target Address

;d0 - (Long) Byte Size

;a5 - (long) Flash Starting Address Offset 1

;a6 - (long) Flash Starting Address Offset 2 ;*****************************************

 

move.l

a0,a2

;a2 & a3 are used to store the starting address

 

move.l

a1,a3

;for comparing.

 

clr.b

d5

;clear d5 as ECHO counter

 

clr.l

d1

;clear d1 as counter

VERIFIY

 

 

 

 

cmp.b

#0,d5

 

 

bne

NO_V

 

 

ECHO

'V'

 

 

ECHO

0

 

NO_V

add.b

#1,d5

 

 

move.w

(a2)+,d2

 

 

move.w

(a3)+,d3

 

 

cmp.w

d2,d3

 

 

bne

ERROR

 

 

add.l

#2,d1

 

 

cmp.l

d0,d1

; if d1<=d0, bra CHECK

 

ble

VERIFIY

 

 

bra

FINISH

 

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

TXD_RDY

 

 

move.l

d7,-(a7)

; Push d7

POLLTXD

 

 

btst.b

#5,$FFFFF906

 

beq.s

POLLTXD

; bra if TXAVAIL not SET

move.w

#$0FFF,d7

 

LP_RDY sub.w

#1,d7

 

bne.b

LP_RDY

 

move.l

(a7)+,d7

; Restore d7

rts

 

 

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

FINISH

ECHO '\n'

ECHO 'P'

ECHO 'A'

C-36M68EZ328ADS v2.0 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Image 37
Contents Preliminary Freescale Semiconductor, IncTable of Contents Comparison of M68EZ328ADS Version 1.x Appendix aResistive Touch Panel Operation Programming On-board Flash MemoryIii M68EZ328ADS v2.0 USER’S Manual List of Illustrations List of Tables Section General Information FeaturesIntroduction Technical Support 1.4.1 M68EZ328ADS Related DocumentationDebugger Installation Procedure Section Quick Installation GuideOverview Equipments RequiredM68EZ328ADS v2.0 Key Component Layout DIP Switch Options for SDS monitor Default DIP Switch Options for Metrowerks monitorInstalling software debugger Connecting M68EZ328ADS v2.0 to PCMetrowerks Codewarrior 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 Switches Control SwitchesDIP Switch pack S1 Setting DIP Switch pack S2 SettingOperation Mode Setting LED IndicatorsFunction of LED Indicators Operation ModesMemory M68VZ328ADS v2.0 Default Memory MapMemory Map Flash MemoryInterface of EMU ROM EMU ROMMC68EZ328 CSD1 EDO DramMC68VZ328 Uart and IrdaLCD Interface LCD and Touch Panel InterfaceTouch Panel Interface Signal Assignment for Touch Panel ControllerSingle Tone Generator Expansion ConnectorsLogic Analyzer Interface Pin Assignments of P4 Power SupplyGND VEE Appendix a Comparison of M68EZ328ADS Version 1.X Table A-2. Software Change for using M68EZ328ADSHardware SoftwareFreescale 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 Memory Offset Address of ROM Image MethodExecuting Program Command Sequence Error Program EnablePolling NOW EchoVerifiy ProgramNOV Echo Finish TxdrdyError Echo BootstrapEND 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 Lxmax Reset OptionsLymax Lcxp#MONSTACKTOP,A7 #$9,PGSEL#0,RTCWD #$08,ICEMCRInitialization Code of SDS Monitor MONITOR.H Equ M328BASE+$150 PWM RegistersARCHIVED by Freescale SEMICONDUCTOR, INC Device Options Addressing OptionsBasein BaseoutIrqmask AcrvalInterrupt Behavior Options StoplevelResethard Usrreset#$7,ICEMSR Monstacktop#0,PCSEL #$0000,GRPBASED#0,PCPDEN BASEIN+OFF7 BASEIN+OFF6ACR Other DefinitionsEndmARCHIVED 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