344
32072H–AVR32–10/2012
AT32UC3A3
– v. Incrementing/decrementing or fixed address for source in SINC field.
– vi. Incrementing/decrementing or fixed address for destination DINC field.
3.
Write the starting destination address in the DARx register for channel x.
Note:
The values in the LLI.DARx register location of each Linked List Item (LLI) in memory, although
fetched during an LLI fetch, are not used.
4.
Write the channel configuration information into the CFGx register for channel x.
a.
Designate the handshaking interface type (hardware or software) for the source
and destination peripherals. This is not required for memory. This step requires pro-
gramming the HS_SEL_SRC/HS_SEL_DST bits, respectively. Writing a ‘0’
activates the hardware handshaking interface to handle source/destination
requests for the specific channel. Writing a ‘1’ activates the software handshaking
interface to handle source/destination requests.
b.
If the hardware handshaking interface is activated for the source or destination
peripheral, assign handshaking interface to the source and destination peripherals.
This requires programming the SRC_PER and DEST_PER bits, respectively.
5.
Make sure that all LLI.CTLx register locations of the LLI (except the last) are set as
6.
Make sure that the LLI.LLPx register locations of all LLIs in memory (except the last)
are non-zero and point to the next Linked List Item.
7.
Make sure that the LLI.SARx register location of all LLIs in memory point to the start
source block address proceeding that LLI fetch.
8.
Make sure that the LLI.CTLx.DONE field of the LLI.CTLx register locations of all LLIs in
memory is cleared.
9.
Clear any pending interrupts on the channel from the previous DMA transfer by writing
a ‘1’ to the Interrupt Clear registers: ClearTfr, ClearBlock, ClearSrcTran, ClearDstTran,
ClearErr. Reading the Interrupt Raw Status and Interrupt Status registers confirms that
all interrupts have been cleared.
11. Program the LLPx register with LLPx(0), the pointer to the first Linked List item.
12. Finally, enable the channel by writing a ‘1’ to the ChEnReg.CH_EN bit. The transfer is
performed. Make sure that bit 0 of the DmaCfgReg register is enabled.
13. The DMACA fetches the first LLI from the location pointed to by LLPx(0).
Note:
The LLI.SARx, LLI.DARx, LLI.LLPx and LLI.CTLx registers are fetched. The LLI.DARx register
location of the LLI although fetched is not used. The DARx register in the DMACA remains
unchanged.
14. Source and destination requests single and burst DMACA transactions to transfer the
block of data (assuming non-memory peripherals). The DMACA acknowledges at the
completion of every transaction (burst and single) in the block and carry out the block
transfer.
Note:
15. The DMACA does not wait for the block interrupt to be cleared, but continues and
fetches the next LLI from the memory location pointed to by current LLPx register and
automatically reprograms the SARx, CTLx and LLPx channel registers. The DARx reg-
ister is left unchanged. The DMA transfer continues until the DMACA samples the CTLx
and LLPx registers at the end of a block transfer match that described in Row 1 or Row