MC68302 Applications
MOTOROLA
MC68302 USER’S MANUAL
D-23
BSET.B
BTST.B
BNE.B
ADDA.W
BRA.B
#$07,(A0)
#$05,(A0)
REINIT0
#$08,A0
ALMDONE
#$700600,A0
ALMDONE
;Set Empty bit of Rx BD
;test Wrap bit
;It set, reinit A0 to 700600
;else inc A0 by 8 to next Rx BD
;Jump to Almost Done
;Reinitialize A0
;Jump to almost Done
REINIT0 MOVEA.L
*Bad Status:
BSTAT
*Note that the UART FRMEC, NOSEC, and PAREC counters record bad status.
BRA.B
INCPTR
* Almost Done:
ALMDONE
MOVE.W
#$0100,1SR
RTE
BRA.B
NOP
;Bad status handler would go here
;Jump back to Receive handler
;Clear SCC3 bit in the ISR
;end of interrupt handler
END
D.5 INDEPENDENT DMA IN THE MC68302
Moving of data between a high-speed peripheral controller and memory is optimized when
a direct memory access (DMA) controller is used. The MC68302 contains an independent
direct memory access (IDMA) controller. Engineers developing system architectures requir-
ing both the M68000 microprocessor and DMA can use the MC68302 to obtain both building
blocks in one package.
The registers associated with the programming of the IDMA are as follows: six IDMA regis-
ters, four interrupt controller registers, and one parallel l/O register (see Table D-1).
D.5.1 IDMA Overview
The IDMA can transfer data between any combination of memory and l/O, in either byte or
word quantities with even or odd source and destination addresses. Each IDMA transfer re-
quires two fundamental operations: reading data from a source address and writing data to
a destination address. A pointer to the source data is contained in the source address point-
Table D-1. IDMA Registers
Acronym
Register
Address
CMR
Channel Mode Register
Base + $802
SAPR
Source Address Pointer Register
Base + $804
DAPR
Destination Address Pointer Register
Base + $808
BCR
Byte Count Register
Base + $80c
CSR
Channel Status Register
Base + $80e
FCR
Function Code Register
Base + $810
GIMR
Global Interrupt Mode Register
Base + $812
IPR
Interrupt Pending Register
Base + $814
IMR
Interrupt Mask Register
Base + $816
ISR
Interrupt In-Service Register
Base + $818
PACNT
Port A Control Register
Base + $81e