AN2168 Freescale Semiconductor / Motorola, AN2168 Datasheet - Page 8

no-image

AN2168

Manufacturer Part Number
AN2168
Description
ColdFire Microprocessor DMA Controller Application Note
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
Single Address
Mode
Single Address
Mode Example
8
CSAR1 = 0x2000 ; base address = 0x20000000
CSMR1 = 0x00000001 ; address range = 0x20000000-0x2000FFFF
CSCR1 = 0x0158 ; 0 waitstates, autoacknowledge, 8-bit port, burst enabled
DSR = 0x01 ; clear status register
SAR = 0x20000000 ; source address = 0x20000000
BCR = 0x0002 ; transfer 2 bytes
DCR = 0x01D1 ; single address, R/W = 1, source=8-bit
Programming the DMA source size and/or destination size to use
bursting bus cycles when possible can help to increase the overall
performance of a DMA transfer. The example in
Example 1
to allow bursting. The entire DMA transfer shown in
12 clock cycles to complete. However, the second example does take
advantage of the chip selects bursting capability, so the DMA transfer in
Figure 4
Setting the destination size to 16-bit instead of 8-bit eliminates two clock
cycles. If the byte count used for the examples had been larger, then
even more clock cycles would have been eliminated by using the 16-bit
destination size. For example, if the transfer byte count had been
100 bytes instead of 2, then example 2 would have completed 100 clock
cycles faster than example 1.
In a single address transfer, only one bus access is performed — a read
or write to the source address. The S_RW bit in the DCR determines the
state of the R/W line during the transfer. Since there is only one bus
cycle, single address mode requires external logic to decode the access
and generate the necessary signals for the second device or an external
peripheral that has built-in logic that will decode the bus cycle.
Figure 5
the following chip select settings:
Then the DMA is programmed with these values:
only takes 10 clock cycles to transfer the same amount of data.
shows a single address transfer to address 0x20000000 using
does not take advantage of the fact that CS1 is programmed
Dual Address Mode
Figure 3
MOTOROLA
takes
AN2168

Related parts for AN2168