UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
149 of 464
NXP Semiconductors
UM10850
Chapter 12: LPC5410x DMA controller
In this example, the channel descriptor is used first, with a first buffer in memory called
buffer A. The configuration of the DMA channel must have been set to indicate a reload.
Similarly, both descriptor A and descriptor B must also specify reload. When the channel
descriptor is exhausted, descriptor B is loaded using the link to descriptor B, and a
transfer interrupt informs the CPU that buffer A is available.
Descriptor B is then used until it is also exhausted, when descriptor A is loaded using the
link to descriptor A contained in descriptor B. Then a transfer interrupt informs the CPU
that buffer B is available for processing. The process repeats when descriptor A is
exhausted, alternately using each of the 2 memory buffers.
12.5.5 Linked transfers (linked list)
A linked transfer can use any number of descriptors to define a complicated transfer. This
can be configured such that a single transfer, a portion of a transfer, one whole descriptor,
or an entire structure of links can be initiated by a single DMA request or trigger.
An example of a linked transfer could start out like the example for a ping-pong transfer
(
). The difference would be that descriptor B would not link back to descriptor A,
but would continue on to another different descriptor. This could continue as long as
desired, and can be ended anywhere, or linked back to any point to repeat a sequence of
descriptors. Of course, any descriptor not currently in use can be altered by software as
well.
12.5.6 Address alignment for data transfers
Transfers of 16 bit width require an address alignment to a multiple of 2 bytes. Transfers
of 32 bit width require an address alignment to a multiple of 4 bytes. Transfers of 8 bit
width can be at any address.
12.5.7 Channel chaining
Channel chaining is a feature that allows completion of a DMA transfer on channel x to
trigger a DMA transfer on channel y. This feature can, for example, be used to have DMA
channel x reading n bytes from UART to memory, and then have DMA channel y
transferring the received bytes to the CRC engine, without any action required from the
ARM core.
To use channel chaining, first configure DMA channels x and y as if no channel chaining
would be used. Then:
•
For channel x:
Table 180: Example descriptors for ping-pong operation: peripheral to buffer
Channel Descriptor
Descriptor B
Descriptor A
+ 0x0 (not used)
+ 0x0 Buffer B transfer configuration
+ 0x0 Buffer A transfer configuration
+ 0x4 Peripheral data end address
+ 0x4 Peripheral data end address
+ 0x4 Peripheral data end address
+ 0x8 Buffer A memory end address
+ 0x8 Buffer B memory end address
+ 0x8 Buffer A memory end address
+ 0xC Address of descriptor B
+ 0xC Address of descriptor A
+ 0xC Address of descriptor B