
351
14.6 Notes on the DMA Controller
This section provides notes on using the DMA controller.
s Order of Priority Between the Channels
When a DMA transfer request has activated a channel, the DMA controller will hold the channel
and will not accept transfer requests from other channels until the current transfer operation
ends.
If multiple channel requests are active at the same time the DMAC detects a DMA transfer
request, the DMAC will determine the order of priority of the channels as follows:
(Highest) channel 0 --> channel 1 --> channel 2 --> channel 3 --> channel 4 --> channel 5 -->
channel 6 --> channel 7 (lowest)
When multiple channel requests occur at the same time, DMA transfer of one channel will be
performed. Control will then be returned to the CPU before DMA transfer of the next channel is
performed.
s Using Resource Interrupt Requests as DMA Transfer Requests
To enable DMAC transfer, the interrupt level of the interrupt controller of the relevant interrupt
must be set to interrupt prohibited.
Conversely, to enable interrupts, the DMAC operation enable bit in the DMAC must be set to
prohibited state. In addition, the interrupt level must be set to an appropriate value.
s Suppressing DMA Transfer When an Interrupt Having Higher Priority Occurs
The MB91107/MB91108 has a function for stopping DMA transfer when an interrupt with higher
priority occurs.
This applies to DMA transfer operations that are performed using the
occurrence of a DMA transfer request.
r HRCL register
The hold request cancel level register (HRCL) of the interrupt controller can be used to stop
DMA transfer when an interrupt request occurs.
When an interrupt request from a peripheral circuit occurs, the DMAC will suppress DMA
transfer if the interrupt level set for the interrupt request is higher than the interrupt level set by
the HRCL register.
If DMA transfer is being executed, the DMAC will cancel the transfer
operation at the break of the transfer operation and open bus authority for the CPU. If the
DMAC is waiting for the occurrence of a DMA transfer request, the DMAC will maintain hold
status even if a DMA transfer request occurs.
After a reset, the HRCL register will be set to the lowest level (31). As a result, DMA transfer
will be suppressed for all interrupt requests. To perform DMA transfer even when an interrupt
request occurs, set the HRCL register to the required value.
r PDRR register
Suppression of DMA transfer operations using the HRCL register is valid only when higher
priority interrupt requests are active. Therefore, if interrupt requests are cleared in a program
such as an interrupt handler, suppression of DMA transfer using the HRCL register can be
released at that time and the CPU can lose bus authority.