Freescale semiconductor, i, Freescale semiconductor, inc – Motorola M68EZ328ADS User Manual
Page 50

Monitor Initialization Code
D-49
M68EZ328ADS v2.0 USER’S MANUAL
MOTOROLA
move.w
#$7,ICEMSR
; clear level 7 interrupt
or.w
#$FF80,ISR
endm
; return non-zero in D0 if ABORT
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
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..
ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005
ARCHIVED BY FREESCALE SEMICONDUCT
OR,
INC.
2005