
6- 42
MC68341 USER'S MANUAL
MOTOROLA
MOVE.L
DARADD,DMADAR1(A0)
* Initialize the byte transfer count reg.
* The number of bytes to be transferred is $E or 7 words
MOVE.L
NUMBYTE,DMABTC1(A0)
* Channel control reg. init. and Start DMA transfers
* No interrupts are enabled, destination (write) cycle. Increment source and
* destination addresses,source size is word, destination size is word.
* REQ is internal. 100% of bus bandwidth, dual-address transfers,
* start the DMA transfers.
MOVE.W
#$0E8D,DMACCR1(A0)
END
***************************************************************************
Example 3: Internal Request Generation, Memory Block Initialization.
***************************************************************************
* MC68341 basic DMA channel register initialization example code.
* This code is used to initialize the 68341's internal DMA channel
* registers, providing basic functions for operation.
* The code sets up channel 1 for internal request generation
* to perform a memory block initialization for 100 bytes.
***************************************************************************
* Equates
***************************************************************************
SARADD
EQU
$6000
source address
DARADD
EQU
$8000
destination address
NUMBYTE EQU
$64
number of bytes to transfer
***************************************************************************
* 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 3. CPU32
* SR I2-I0 bits must be less than or equal to ISM bits for channel startup.
* Supervisor/user reg. unrestricted, MAID field at 3.
* IARB priority at 4.
MOVE.W
#$0334,(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.
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
..
.