
6- 44
MC68341 USER'S MANUAL
MOTOROLA
***************************************************************************
* Initialize DMA Channel 1
***************************************************************************
LEA
MODBASE+DMACH1,A0
Pointer to channel 1
* Initialize DMA channel 1 MCR
* Normal Operation, ignore FREEZE, dual-address mode. ISM field at 0. CPU32
* SR I2-I0 bits must be less than or equal to ISM bits for channel startup.
* Supervisor/user reg. unrestricted, MAID field at 4. IARB priority at 8.
MOVE.W
#$00C8,(A0)
* Clear channel control reg.
* Clear STR (start) bit to prevent the channel from starting a transfer early.
CLR.W
DMACCR1(A0)
* Initialize interrupt reg.
* Interrupt priority at 7, interrupt vector at $42.
MOVE.W
#$0742,DMAINT1(A0)
* Initialize channel status reg.
* Clear the DONE, BES, BED, CONF and BRKP bits to allow channel to startup.
MOVE.B
#$7C,DMACSR1(A0)
* Initialize function code reg.
* DMA space, supervisor data space for source and destination.
MOVE.B
#$DD,DMAFCR1(A0)
* Initialize source operand address
* Source address is equal to $6001, and odd address.
MOVE.L
SARADD,DMASAR1(A0)
* Initialize destination operand address
* Destination address is equal to $10000, and even address.
MOVE.L
DARADD,DMADAR1(A0)
* Initialize the byte transfer count register
* The number of bytes to be transferred is $14 or 20 bytes
MOVE.L
NUMBYTE,DMABTC1(A0)
* Channel control reg. init. and Start DMA transfers
* No interrupts are enabled, source (read) cycle.
* Increment the source and destination addresses.
* Source size is byte, destination size is word. REQ is external cycle steal.
* dual-address transfers, start the DMA transfers.
MOVE.W
#$1DB1,DMACCR1(A0)
END
***************************************************************************
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.