UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
190 of 362
NXP Semiconductors
UM10208
Chapter 15: LPC2800 GPDMA
6.
Scatter/Gather
Scatter/gather is supported through the use of linked lists. This means that the source and
destination data do not have to occupy contiguous areas in memory. This capability
requires two consecutively-numbered GPDMA channels. The lower-numbered (“block
handling”) channel handles the actual data transfer, and the higher numbered
(“list-following”) channel transfers the linked-list information from memory to the registers
of the block-handling channel.
6.1 Linked list entry format
Each entry in a linked list contains five words as shown in
The GPDMA channels’ Alternate Register addresses are arranged so that these five
words can be transferred by the list-following channel into exactly these 5 registers.
Each linked list entry (except a “last” entry) describes one block of data to be transferred,
and should contain the channel number of the list-following channel in the PairedChannel
field of its Configuration word, and a 1 in the PairedChannelEnab bit of the Configuration
word. Depending on other fields in the Configuration value, the block transfer may be
memory-to-peripheral, peripheral-to-memory, memory-to-memory, or even
peripheral-to-peripheral, and may consist of bytes, halfwords, or words. Entries in a linked
list can be arranged sequentially in memory, but obviously they don’t have to be
sequential.
A circular linked list of N buffers can be constructed by having the Next Entry Address of
the Nth entry point back to the first entry in the list. In such a scheme, typically the IRQ
Mask bit for buffer completion by the block-handling channel would be 0, so that the
completion of each block in the list will cause an interrupt. Then the ISR (or a task
activated thereby) could fill a completed output buffer with more data, or copy the data in a
completed input buffer to some other memory area.
Table 213. Linked list entry format
Word Content
Description
0
Source Address
The list-following channel will transfer this word into the Source
Address Register of the block-handling channel. Actually it will do
this by writing this value to the block-handling channel’s Alternate
Source Address Register.
1
Dest Address
The list-following channel will transfer this word into the Destination
Address Register of the block-handling channel. Actually it will do
this by writing this value to the block-handling channel’s Alternate
Destination Address Register.
2
Transfer Length
The list-following channel will transfer this word into the Transfer
Length Register of the block-handling channel. Actually it will do this
by writing this value to the block-handling channel’s Alternate
Transfer Length Register.
3
Configuration
The list-following channel will transfer this word into the Configuration
Register of the block-handling channel. Actually it will do this by
writing this value to the block-handling channel’s Alternate
Configuration Register.
4
Next Entry Address The list-following channel will transfer this word into its own Source
Address Register. Actually it will do this by writing this value to its
own Alternate Source Address Register.