If the upcoming transfer is the first for the transfer request, the corresponding Busy Channel x bit in the
Busy Channels register will be set (
.BUSYCHx=1), and it will remain '1' for the subsequent
granted transfers.
When the channel has performed its granted transfer(s) it will be either fed into the queue of channels
with pending transfers, set to be waiting for a new transfer trigger, suspended, or disabled. This depends
on the channel and block transfer configuration. If the DMA channel is fed into the queue of channels with
pending transfers, the corresponding
.BUSYCHx will remain '1'. If the DMA channel is set to wait
for a new transfer trigger, suspended, or disabled, the corresponding
If a DMA channel is suspended while it has a pending transfer, it will be removed from the queue of
pending channels, but the corresponding
.PENDCHx will remain set. When the same DMA
channel is resumed, it will be added to the queue of pending channels again.
If a DMA channel gets disabled (
.ENABLE=0) while it has a pending transfer, it will be removed
from the queue of pending channels, and the corresponding
.PENDCHx will be cleared.
Figure 26-4. Arbiter Overview
Channel 0
Channel N
Active
Channel
Priority
decoder
Active.LVLEXx
PRICTRLx.LVLPRI
Arbiter
CTRL.LVLENx
Burst Done
Transfer Request
Channel Number
Level Enable
Channel Burst Done
Channel Priority Level
Channel Pending
Channel Suspend
Channel Burst Done
Channel Priority Level
Channel Pending
Channel Suspend
Priority Levels
When a channel level is pending or the channel is transferring data, the corresponding Level Executing
bit is set in the Active Channel and Levels register (
.LVLEXx).
Each DMA channel supports a 4-level priority scheme. The priority level for a channel is configured by
writing to the Channel Arbitration Level bit group in the Channel Control B register (CHCTRLB.LVL). As
long as all priority levels are enabled, a channel with a higher priority level number will have priority over a
channel with a lower priority level number. Each priority level x is enabled by setting the corresponding
Priority Level x Enable bit in the Control register (
.LVLENx=1).
Within each priority level the DMAC's arbiter can be configured to prioritize statically or dynamically:
Static Arbitration
within a priority level is selected by writing a '0' to the Level x Round-Robin Scheduling
Enable bit in the Priority Control 0 register (
.RRLVLENx).
When static arbitration is selected, the arbiter will prioritize a low channel number over a high channel
number as shown in the figure below. When using the static arbitration there is a risk of high channel
numbers never being granted access as the active channel. This can be avoided using a dynamic
arbitration scheme.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
440