Motorola M68EZ328ADS user manual #$7,ICEMSR, Usrreset, Monstacktop, Resethard

Models: M68EZ328ADS

1 65
Download 65 pages 48.8 Kb
Page 50
Image 50

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Monitor Initialization Code Freescale Semiconductor, Inc.

move.w

#$7,ICEMSR

;

clear level 7 interrupt

or.w

#$FF80,ISR

 

 

endm

 

;

return non-zero in D0 if ABORT

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

INT_DOG: macro endm

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

;Macros for use at application startup (EXEC)

;and stop (DONE). Normally these are empty.

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

USR_EXEC: macro endm

USR_DONE: macro endm

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

*RESET OPTIONS

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

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

;Contents of the "usr_reset" section. In the usual

;case, this is two longwords long, with the first word

;containing the value with which the processor

;loads up its stack pointer, and the second of

;which is the value with which the processor

;loads up its program counter. This will bring up

;the monitor on a hardware reset.

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

USR_RESET:

macro

 

 

dc.l

MON_STACKTOP

;

stack pointer (default)

dc.l

reset$$$

;

program counter (default)

dcb.l

6,0

 

 

endm

 

 

 

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

;Hard reset macro - contains very high priority

;instructions which must be executed immediately

;upon a hardware reset.

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

RESET_HARD:

macro

 

move.b

#$9,PGSEL

; config PG0/DTACK to GPI/O,input

move.w

#$2410,PLLCR

; sysclk = VCO/1, enable clko

move.l

#MON_STACKTOP,A7

; Install stack pointer

move.w

#$2700,sr

; mask off all interrupts

move.b

#$1C,SCR

; enable bus error timeout bit

move.w

#0,RTCWD

; disable watch dog

move.b

#$03,PFSEL

; select A23-A20, CLKO, CSA1

move.b

#$00,PBSEL

; Config port B for chip select A,B,C and D

move.b

#$00,PESEL

; select *DWE

move.w

#$08,ICEMCR

; disable ICEM vector hardmap

D-49M68EZ328ADS v2.0 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Page 50
Image 50
Motorola M68EZ328ADS user manual #$7,ICEMSR, Usrreset, Monstacktop, Resethard