Monitor Initialization Code
C-47
M68VZ328ADS USER’S MANUAL
MOTOROLA
; "read" interrupt, then you must include the necessary
; code inside the INT_RCLEAR macro below.
; **************************************************
INT_RCLEAR:
macro
endm
; *********************************************************************
;
"stop" interrupt
;
We will only stop the target if the ABORT switch is pressed. We
;
will not stop for HOST_NMI or EXT_NMI interrupts.
;
The Non-Maskable Interrupt status is in the NMI_STATUS register
;
which is in even-byte locations at NMI_STATUS. Bit #0 of the
; first byte at NMI_STATUS indicates that the ABORT switch was pressed.
; *********************************************************************
INT_STOP:
macro
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
;************************************************
;* System initialization
*
;************************************************
;* Replace the system initialization code here
*
;************************************************
move.b
#$18,SCR
; Disable Double Map
move.b
#$9,PGSEL
; config PG0/DTACK to GPI/O,input
move.w
#$2480,PLLCR
; ??MHz Sysclk, enable clko
move.l
#MON_STACKTOP,A7
; Install stack pointer
move.w
#$2700,sr
; mask off all interrupts
move.w
#$00,RTCWD
; disable watch dog
move.w
#$08,ICEMCR
; disable ICEM vector hardmap
move.w
#$07,ICEMSR
; clear level 7 interrupt
;******************************
;* Port Initialization
*
;******************************
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.b
#$F1,PKSEL
move.b
#$00,PMSEL
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..