
342
CHAPTER 14 DMA CONTROLLER (DMAC)
s Continuous Transfer Mode
1. Use an initialization routine to set the descriptor.
2. Use a program to initialize the DMA transfer request source.
Set the external transfer
request input pin to H or L level detection.
3. Use a program to write 1 to the desired DACSR DOEn bits.
--- This completes setting of the DMA. ---
4. When the DMAC detects DMA transfer request input, bus authority is requested from the
CPU.
5. When the CPU transfers the bus authority to the DMAC, the DMAC accesses the information
of the three words in the descriptor through the bus.
6. The DMACT is decremented. One transfer operation is performed based on the information
in the descriptor.
The transfer request acceptance output signal is output during data
transfer. When the decremented DMACT reaches 0, the transfer end output signal is output
during data transfer.
7. If the DMACT value is not 0 and there is a DMA request from a resource, the operation is
repeated starting from step 6.
8. If the DMACT value is 0 or DMA requests from the resources have been released, the SADR
or DADR is incremented or decremented. This value and the DMACT value are written back
to the descriptor.
9. The bus authority is returned to the CPU.
10.If the counter value is 0, an interrupt is issued to the CPU if DACSR DEDn has been set to 1
and interrupts enabled.
The minimum number of required cycles per transfer operation is as described below. The
descriptor is stored in internal RAM, data is transferred between external buses, and the data
length is bytes.
If the transfer source and transfer destination addresses are fixed: (6 + 5 × n) cycles
If the transfer source or transfer destination address is fixed: (7 + 5 × n) cycles
If the transfer source and transfer destination addresses are increased or reduced:
(8 + 5 × n) cycles
s Burst Transfer Mode
1. Use an initialization routine to set the descriptor.
2. Use a program to initialize the DMA transfer request source. If an internal peripheral circuit
is selected as the DMA transfer request source, enable interrupt requests. ICR interrupts of
the interrupt controller are prohibited at this time.
3. Use a program to set the appropriate DACSR DOEn bits to 1.
--- This completes the DMA setting procedure. ---
4. When the DMAC detects DMA transfer request input, it requests bus authority from the CPU.
5. After the CPU transfers the bus authority to the DMAC, the DMAC accesses the information
in the three words of the descriptor through the bus.
6. The value in the DMACT is decremented. Transfer operations are performed based on the
information in the descriptor for the number of times specified by the DMACT. The transfer
request acceptance output signal is output during data transfer (if external transfer request
input is used). When the decremented DMACT reaches 0, the transfer end output signal is
output during data transfer.