Motorola M68EZ328ADS user manual Program Enable, Polling, Error, NOW Echo

Page 36

Freescale Semiconductor, Inc.

Programming On-board Flash Memory

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

move.l pSOURCE,A0 move.l pTARGET,A1

moveARCHIVED.l pSIZE,D0BY FREESCALE SEMICONDUCTOR, INC. 2005

move.l pFLASH,A5 move.l pFLASH,A6

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

* BreakPoint Here if program flash in SDS *

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

add.l #OFFSET1,A5 add.l #OFFSET2,A6

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

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

;Input Parameters:

;a0 - (Long) Source Address

;a1 - (Long) Target Address

;d0 - (Long) Byte Size

;a5 - (long) Flash Starting Address Offset1

;a6 - (long) Flash Starting Address Offset2 ;*****************************************

 

move.l

a0,a2

; a2 as source

 

move.l

a1,a3

; a3 as target

 

clr.l

d1

; clear d1 as counter

 

clr.b

d5

; clear d5 as ECHO counter

PROGRAM

 

 

 

 

ENABLE

 

 

 

move.w

(a2),(a3)

; Copy source to target

 

clr.l

d4

; clear d4 as polling counter

POLLING

 

 

 

 

cmp.l

#TIME,d4

 

 

bgt

ERROR

; if d4>#TIME, bra ERROR

 

add.l

#1,d4

; d4++

 

move.w

(a2),d2

; Compare (a0),(a1)

 

move.w

(a3),d3

 

 

cmp.w

d2,d3

 

 

bne

POLLING

; End of POLLING

 

add.l

#2,a2

 

 

add.l

#2,a3

 

 

add.l

#2,d1

 

 

cmp.b

#0,d5

 

 

bne

NO_W

 

 

ECHO

'W'

 

 

ECHO

0

 

NO_W

add.b

#1,d5

 

C-35M68EZ328ADS v2.0 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Image 36
Contents Freescale Semiconductor, Inc PreliminaryTable of Contents Appendix a Comparison of M68EZ328ADS Version 1.xResistive Touch Panel Operation Programming On-board Flash MemoryIii M68EZ328ADS v2.0 USER’S Manual List of Illustrations List of Tables Features Section General InformationIntroduction Related Documentation Technical Support 1.4.1 M68EZ328ADSDebugger Section Quick Installation Guide Installation ProcedureOverview Equipments RequiredM68EZ328ADS v2.0 Key Component Layout Default DIP Switch Options for Metrowerks monitor DIP Switch Options for SDS monitorConnecting M68EZ328ADS v2.0 to PC Installing software debuggerMetrowerks 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 M68EZ328ADS v2.0 Functional Block Diagram Section Hardware Description and Board OperationControl Switches DIP SwitchesDIP Switch pack S1 Setting DIP Switch pack S2 SettingLED Indicators Operation Mode SettingFunction of LED Indicators Operation ModesM68VZ328ADS v2.0 Default Memory Map MemoryMemory Map Flash MemoryEMU ROM Interface of EMU ROMEDO Dram MC68EZ328 CSD1Uart and Irda MC68VZ328LCD and Touch Panel Interface LCD InterfaceSignal Assignment for Touch Panel Controller Touch Panel InterfaceExpansion Connectors Single Tone GeneratorLogic Analyzer Interface Power Supply Pin Assignments of P4GND VEE Table A-2. Software Change for using M68EZ328ADS Appendix a Comparison of M68EZ328ADS Version 1.XHardware SoftwareFreescale Semiconductor, Inc Appendix B Resistive Touch Panel Operation General Concepts of Resistive PanelsDetermination of X,Y Position Appendix C Programming ON-BOARD Flash Memory Elements for Programming the FlashMethod Offset Address of ROM ImageExecuting Program Command Sequence Program Enable ErrorPolling NOW EchoProgram VerifiyNOV Echo Finish TxdrdyBootstrap Error EchoEND Figure C-2. Flash Program Algorithm Freescale Semiconductor, Inc Initialization Code of Metrowerks Monitor RESET.S Appendix D Monitor Initialization CodeMonitor Initialization Code Freescale Semiconductor, Inc Reset Options LxmaxLymax Lcxp#$9,PGSEL #MONSTACKTOP,A7#0,RTCWD #$08,ICEMCRInitialization Code of SDS Monitor MONITOR.H Equ M328BASE+$150 PWM RegistersARCHIVED by Freescale SEMICONDUCTOR, INC Addressing Options Device OptionsBasein BaseoutAcrval IrqmaskInterrupt Behavior Options StoplevelUsrreset Resethard#$7,ICEMSR Monstacktop#$0000,GRPBASED #0,PCSEL#0,PCPDEN BASEIN+OFF6 BASEIN+OFF7ACR Other DefinitionsEndmARCHIVED by Freescale SEMICONDUCTOR, INC Freescale Semiconductor, Inc Appendix E Schematics M68EZ328ADSM68EZ328ADS By Freescale SEMICONDUCTOR, INC Memory Inc LCD ScreenFreescale Uart PortsIrDA Reset Circuit Misc Logic Analyzer Connectors Test pin & VME connector