English
Language : 

MC68340FE16E Datasheet, PDF (136/441 Pages) Freescale Semiconductor, Inc – Integrated Processor with DMA User’s Manual
Freescale Semiconductor, Inc.
***************************************************************************
* Initialization code
***************************************************************************
* Start Chip Select Initialization:
INIT340 MOVE.W #$2700,SR
Init SR - interrupts masked
***************************************************************************
* Set up default module base address value
MOVEQ.L #7,D0
MBAR is in CPU space
MOVEC.L D0,DFC
load DFC to indicate CPU space
MOVE.L #MODBASE+1,D0
Set address/valid bit
MOVES.L D0,MBAR
write to MBAR
***************************************************************************
* Set up system protection register:
* Software watchdog disabled, double bus fault monitor disabled, bus
* monitor BERR after 16 clocks.
MOVE.B #6,SYPCR+MODBASE
***************************************************************************
* Clock synthesizer control register:
* Switch from 8.3 to 16.7 MHZ
MOVE.W #$7F00,SYNCR+MODBASE X-bit doubles the default speed
***************************************************************************
* Module configuration register:
* When FREEZE is asserted, software watchdog and periodic interrupt timer
* are disabled, bus monitor is enabled. Port B = 4 IRQs, 4 chip selects.
* Show Cycles enabled, external arbitration enabled. Supervisor/user
* SIM registers unrestricted, Interrupt Arbitration at priority $F
MOVE.W #$420F,MCR+MODBASE
***************************************************************************
* Now, set up Address masks and base addresses for the chip selects:
LEA
CSAM0+MODBASE,A0 Point to CS0 addr. mask location.
MOVEQ #7,D
Set up a loop counter.
LEA
CSAM0$,A1
Point to addr mask memory location.
LOOP MOVE.L (A1)+,(A0)+
Init. addr mask and base addr reg
DBRA
D0,LOOP
MOTOROLA
MC68340 USER’S MANUAL
4-39
For More Information On This Product,
Go to: www.freescale.com