UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
192 of 362
NXP Semiconductors
UM10208
Chapter 15: LPC2800 GPDMA
bit is 1, when it completes the buffer the list-following channel (identified by the
block-handling channel’s Paired Channel field) is enabled. Return to “Operation of the
List-Following channel” on page 191.
6.4.2 For a last entry
When the block-transfer channel is enabled for the last entry of a linked list, it reads a
word from the Source address and writes it to the Destination address. Because the
Transfer Length is 0 (indicating 1 transfer), it has then completed the block, which may or
may not result in an interrupt. If not, software should set up the last entry so that the write
is to the DMA Software Interrupt Register (0x8010 3C10), which should not be masked so
that an “end-of-list interrupt” occurs. Because the last entry has its PairedChannelEnab bit
0, the link-following channel is not enabled.
6.5 Variations on this theme
Handling a linked list with paired DMA channels allows great flexibility from the procedure
described above. In the most elegant scheme, the ISR and triggered tasks don’t move
data into or out of the blocks completed by the block transfer channel. Instead the buffers
are simply added to the end of a list of input buffers to be processed, or a list of “free”
output buffers. When such a buffer has had its data processed or filled, it can be added to
the end of the same linked list, or a linked list for a different pair of DMA channels. This
scheme can yield more efficient processing than moving data around, but does represent
a higher order of programming complexity.
Other variations on how to end a linked list are possible, and are left to the reader’s
ingenuity.
7.
Flow control
Whenever the SourceID or DestID field of the Configuration Register of a GPDMA
channel is non-zero, the channel operates under the control of the flow controls signals
from the identified peripheral. If both fields are non-zero, indicating a
peripheral-to-peripheral transfer, data is transferred when both peripherals request
transfer. In this case it is advantageous if:
1. the source peripheral include sufficient data buffering to avoid overrun conditions,
and/or
2. the destination includes sufficient buffering to avoid underrun conditions, and/or
3. the data clocks of the two peripherals are the same.