AN2168 Freescale Semiconductor / Motorola, AN2168 Datasheet - Page 25

no-image

AN2168

Manufacturer Part Number
AN2168
Description
ColdFire Microprocessor DMA Controller Application Note
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
DmaInit:
loop:
DMA Interrupt Example
; This a simple DMA interrupt example using the DIVR to provide the vector
; for the DMA interrupt. The code assumes that a chip select or DRAM bank has
; already been mapped to cover the source and destination address (0x20000 and
; 0x40000). The code runs from address 0x20000000, so internal SRAM or other
; memory needs to be mapped to this region.
DMA_VECTOR:
AN2168
MOTOROLA
move.b #0x04,d0
move.b d0,UCR
move.b #0x01,d0
move.b d0,UCR
move.b #0x01,d0
move.b d0,DSR
move.l #URB,d0
move.l d0,SAR2
move.l #0x20000,d0
move.l d0,DAR2
move.w #0x10,d0
move.w d0,BCR2
move.w #0x601A,d0
move.w d0,DCR2
nop
nop
bra
org $100
loop
;enable transmitter
;enable receiver
;clear the DMA status register
;set the source address register to
;point to the UART0 receiver buffer
;destination address = 0x20000
;transfer 16 bytes/characters
;external request, cycle steal mode,
;dest & source = 8-bit, the source address
;is not incremented, the destination is
;idle loop
DMA Interrupt Example
Application Note
25

Related parts for AN2168