D-BUG12 STARTUP CODE
68EVB912B32UM/D
C-2
;*****************************************************************************
**
; INITIALIZATION
;
; The code in this section is initialization for the monitor on the EVB12B32
;*****************************************************************************
**
__MonStartup:
lds
#STACKTOP
; initialize monitor stack pointer
;
;
Disable the COP watchdog by CR2:CR 1:CR0 = 0:0:0
;
COPCTL = $07 when reset in normal modes
;
FCME and CRx bits are write once in normal modes
;
COPCTL [ CME :FCME : FCM : FCOP ! DISR : CR2 : CR1 : CR0 ] $--16
;
clr
COPCTL
; disable watchdog
;
;
Clear all monitor RAM to start from a known state
;
ldx
#MonRAMStart
ClrRAM:
clr
1,x+
; clear one and inc pointer
cpx
#MonRMonRAMSize
bne
ClrRAM
; loop till RAM clear
;
Enable pipe signals, E, low strobe and read/write in port E
;
PIPOE, NECLK, LSTRE and RDWE are write once i n normal modes
;
PEAR [ARSIE :CDLTE :PIPOE :NECLK !LSTRE : RDWE : 0 : 0 ] $--0A
;
ldaa
#$2c
; prevent later protection lock
staa
PEAR
; PROTLK is write-once
;
Without changing modes, enable internal visibility
;
MODE [SMODN : MODB : MODA : ESTR ! IVIS : 0 : EMD : EME ] $--0B
;
bset
MODE,$08
; set IVIS
;
Enable EEPROM so monitor can program/erase bytes
;
EEMCR [ 1 : 1 : 1 : 1 ! 1 : 1 :PROTLK: EERC ] $--F0
;
BPROT [ 1 :BPROT6:BPROT5:BPROT4!BPROT3:BPROT2: BPROT1:BPROT0] $--F1
;
ldaa
#$fc
; prevent later protection lock
staa
EEMCR
; PROTLK is write-once
clr
BPROT
; allow EE program and erase
;
;
Disable writing to the on-chip Flash EEPROM
;
FEELCK [ 0 : 0 : 0 : 0 : 0 : 0 : 0 : LOCK] $--F4
;
ldaa
#$01
; write a 1 to the Flash LOCK bit to
; disable accidential reprogramming of
staa
FEELCK
; the flash memory (where we’re located)
;
ldd
EEBase
; get the user supplied base address of the
; on-chip EEPROM
oraa
#1
; make sure that the EEON bit remains set.
staa
INITEE
; re-map the on-chip EEPROM.
;
ldd
IOBase
; get the user supplied base address of the
; on-chip I/O registers
Summary of Contents for M68EVB912B32
Page 8: ...CONTENTS 68EVB912B32UM D viii ...
Page 11: ...GENERAL INFORMATION 68EVB912B32UM D 1 3 Figure 1 1 EVB Layout and Component Placement ...
Page 22: ...CONFIGURATION AND SETUP 68EVB912B32UM D 2 6 ...
Page 80: ...OPERATION 68EVB912B32UM D 3 58 ...
Page 90: ...HARDWARE REFERENCE 68EVB912B32UM D 4 10 ...
Page 102: ...COMMUNICATIONS PROGRAM EXAMPLES 68EVB912B32UM D B 8 ...
Page 106: ...D BUG12 STARTUP CODE 68EVB912B32UM D C 4 ...
Page 112: ...D BUG12 CUSTOMIZATION DATA 68EVB912B32UM D D 6 ...
Page 122: ...INDEX 68EVB912B32UM D 4 ...