Motorola M68EZ328ADS user manual Appendix D Monitor Initialization Code

Page 41

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

APPENDIX D

MONITOR INITIALIZATION CODE

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

D.1 INITIALIZATION CODE OF METROWERKS MONITOR (RESET.S)

MON_STACKTOP.equ$4100; Above is TOO low, try this

M328BASE

.equ $FFFFF000

 

; SIM28 System Configuration Registers

 

SCR

.equ

(M328BASE+$000)

 

; Chip Select Registers

 

 

GRPBASEA

.equ

(M328BASE+$100)

 

GRPBASEB

.equ

(M328BASE+$102)

 

GRPBASEC

.equ

(M328BASE+$104)

 

GRPBASED

.equ

(M328BASE+$106)

 

CSA

.equ

(M328BASE+$110)

 

CSB

.equ

(M328BASE+$112)

 

CSC

.equ

(M328BASE+$114)

 

CSD

.equ

(M328BASE+$116)

 

DRAMCFG

.equ

(M328BASE+$C00)

 

DRAMCTL

.equ

(M328BASE+$C02)

 

EMUCS

.equ

(M328BASE+$118)

 

CSCTR

.equ

(M328BASE+$150)

 

; PLL Registers

 

 

 

PLLCR

.equ

(M328BASE+$200) ; Control Reg

 

PLLFSR

.equ

(M328BASE+$202) ; Freq Select Reg

 

PLLTSR

.equ

(M328BASE+$204) ; Test Reg

 

; Power Control

Registers

 

 

PCTLR

.equ

(M328BASE+$206) ; Control Reg

 

; Interrupt Registers

 

 

IVR

.equ

(M328BASE+$300) ; Interrupt Vector Reg

 

ICR

.equ

(M328BASE+$302) ; Interrupt Control Reg

 

IMR

.equ

(M328BASE+$304) ; Interrupt Mask Reg

 

ISR

.equ

(M328BASE+$30C) ; Interrupt Status Reg

 

IPR

.equ

(M328BASE+$310) ; Interrupt Pending Reg

 

; PIO Registers

 

 

 

 

 

; Port A Registers

 

PADIR

.equ

(M328BASE+$400) ; Direction Reg

 

PADATA

.equ

(M328BASE+$401) ; Data Reg

 

PAPUEN

.equ

(M328BASE+$402) ; Pullup Enable Reg

 

 

 

; Port B Registers

 

PBDIR

.equ

(M328BASE+$408) ; Direction Reg

 

PBDATA

.equ

(M328BASE+$409) ; Data Reg

 

PBPUEN

.equ

(M328BASE+$40A) ; Pullup Enable Reg

 

PBSEL

.equ

(M328BASE+$40B) ; Select Reg

 

 

 

; Port C Registers

 

PCDIR

.equ

(M328BASE+$410) ; Direction Reg

 

PCDATA

.equ

(M328BASE+$411) ; Data Reg

 

MOTOROLA

M68EZ328ADS v2.0 USER’S MANUAL

D-40

 

For More Information On This Product,

 

 

 

Go to: www.freescale.com

 

Image 41
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 Introduction FeaturesSection General Information Debugger Related DocumentationTechnical Support 1.4.1 M68EZ328ADS 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 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 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 ControllerLogic Analyzer Interface Expansion ConnectorsSingle Tone Generator 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 MemoryOffset Address of ROM Image MethodExecuting Program Command Sequence Error Program EnablePolling NOW EchoVerifiy ProgramNOV Echo Finish TxdrdyEND 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 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,PCPDEN #$0000,GRPBASED#0,PCSEL 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