
II BUS MODULES: INTELLIGENT DMA (IDMA)
II-2-16
EPSON
S1C33E07 TECHNICAL MANUAL
II.2.6 Interrupt Function of Intelligent DMA
IDMA can generate an interrupt that causes invocation of IDMA and an interrupt for the completion of IDMA
transfer itself.
Interrupt when invoked by a cause of interrupt
If the corresponding bits of the IDMA request and interrupt enable registers are left set (= 1), assertion of an
interrupt request is kept pending even when the enabled cause of interrupt has occurred and the IDMA channel
assigned to that cause of interrupt is invoked.
If the transfer counter is decremented to 0 and DINTEN = 1 (interrupt enabled) when one DMA transfer is
completed, the cause of interrupt that has invoked IDMA is not reset and an interrupt request is generated. At
the same time, the IDMA request bit is cleared to 0. The IDMA enable bit is not cleared and remains set to 1.
If the transfer counter is not 0, the cause-of-interrupt flag is reset when the DMA transfer is completed, so that
no interrupt is generated. In this case, the IDMA request bit and IDMA enable bit are not cleared and remain
set to 1.
When DINTEN has been set to 0 (interrupt disabled), the cause-of-interrupt flag is reset even if the transfer
counter reaches 0, so that no interrupt is generated. In this case, the IDMA request bit is not cleared but the
IDMA enable bit is cleared.
When IDMA is invoked by a cause of interrupt, the IDMA cause-of-interrupt flag FIDMA (D4/0x300281) will
not be set.
For details about the causes of interrupt that can be used to invoke IDMA and the interrupt control registers,
refer to the descriptions of the peripheral circuits in this manual.
Note that the priority levels of causes of interrupt are set by the interrupt priority register. Refer to Section III.2,
“Interrupt Controller (ITC).” However, when compared between IDMA and interrupt requests, IDMA is given
higher priority over the other. Consequently, even when a cause of interrupt occurring during an IDMA transfer
has higher priority than the cause of interrupt that invoked the IDMA transfer, an interrupt request for it or a
new IDMA invocation request is not accepted until after the current IDMA transfer is completed.
Software-triggered interrupts
If the transfer counter is decremented to 0 and DINTEN = 1 (interrupt enabled) when one DMA transfer
operation is completed, FIDMA (D4/0x300281) is set, thereby generating an interrupt request. If the transfer
counter is not 0 or DINTEN = 0 (interrupt disabled), FIDMA (D4/0x300281) is not set.
IDMA interrupt control register in the interrupt controller
The following control bits are used to control an interrupt for the completion of IDMA transfer:
FIDMA: IDMA Cause-of-Interrupt Flag in the DMA Interrupt Cause Flag Register (D4/0x300281)
EIDMA: IDMA Interrupt Enable Bit in the DMA Interrupt Enable Register (D4/0x300271)
PDM[2:0]: IDMA Interrupt Level Bits in the IDMA Interrupt Priority Register (D[2:0]/0x300265)
When a DMA transfer in the IDMA channel invoked by a trigger in the software application or subsequent
link is completed and the transfer counter is decremented to 0, the cause-of-interrupt flag for the completion of
IDMA transfer is set to 1. However, this requires as a precondition that interrupt be enabled (DINTEN = 1) in
the control information for that channel. If the interrupt enable register bit remains set (= 1) when the flag is set,
an interrupt request is generated. Interrupts can be disabled by leaving the interrupt enable register bit cleared (=
0). Use the interrupt priority register to set interrupt priority levels (0 to 7). An interrupt request to the CPU is
accepted on condition that no other interrupt request of higher priority is generated.
Furthermore, it is only when the PSR's IE bit = 1 (interrupt enabled) and the set value of IL is smaller than
the IDMA interrupt level which is set by the interrupt priority register that the CPU actually accepts an IDMA
interrupt request.
For details about these interrupt control registers, and for information on device operation when an interrupt
occurs, refer to Section III.2, “Interrupt Controller (ITC).”
Trap vector
The trap vector address for an interrupt upon completion of IDMA transfer by default is set to 0xC00068.
The trap table base address can be changed using the TTBR registers.