
ML674001 Series/ML675001 Series User’s Manual
Chapter 12
Direct Memory Access Controller (DMAC)
12-18
12.3.4
Ending a DMA Transfer
DMA transfers end in one of three ways.
1.
Normal termination:
The DMA transfer automatically ends when the number of transfers specified in the DMA transfer
count register (DMACSIZ0 or DMACSIZ1) for the DMA channel are complete. The DMA controller
sets IREQ0 or IREQ1 in the DMA transfer complete interrupt status register (DMAINT) to “1,” but
does not change the ISTA0 and ISTA1 bits. If the IMK bit in the DMA transfer mode register
(DMACTMOD0 or DMACTMOD1) is “0,” the DMA controller generates an interrupt request.
2.
Abnormal termination:
An error response during the cycle reading from the transfer source or the one writing to the transfer
destination immediately terminates the DMA transfer. The DMA controller sets IREQ0 or IREQ1 in
the DMA transfer complete interrupt status register (DMAINT) to “1,” sets ISTA0 or ISTA1 to “1,”
and indicates which cycle triggered the error in ISTP0 or ISTP1. If the IMK bit in the DMA transfer
mode register (DMACTMOD0 or DMACTMOD1) is “0,” the DMA controller generates an interrupt
request.
3.
Forced termination:
Setting the IMK bit in the DMA transfer mode register (DMACTMOD0 or DMACTMOD1) to “1”
during a DMA transfer suspends operation after the write cycle. There is no interrupt. The program
can restart operation by releasing the mask.
The program uses an interrupt handler or polling to determine termination and branches according to the
DMA transfer complete status.
Normal termination
1.
The program sets the IMK bit in the DMA transfer mode register (DMACTMOD0 or DMACTMOD1)
to “1” to mask channel operation.
2.
The program writes to the DMA interrupt clear register (DMACCINT0 or DMACCINT1) for the
channel to clear the status bits.
Abnormal termination
1.
The program sets the IMK bit in the DMA transfer mode register (DMACTMOD0 or DMACTMOD1)
to “1” to mask channel operation.
2.
The program reads the status bits (IREQ, ISTA, and ISTP) from the DMA transfer complete status
register (DMAINT).
3.
The program writes to the DMA interrupt clear register (DMACCINT0 or DMACCINT1) for the
channel to clear the status bits.
4.
The program processes the error in accordance with the needs of the user application system.