Initialization and Configuration
617
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Micro Direct Memory Access (µDMA)
controller to respond to single and burst requests.
4. Set bit 8 of the DMA Channel Request Mask Clear (DMAREQMASKCLR) register to allow the µDMA
controller to recognize requests for this channel.
8.4.4.2
Configure the Channel Control Structure
This example transfers bytes from the peripheral's receive FIFO register into two memory buffers of
64 bytes each. As data is received, when one buffer is full, the µDMA controller switches to use the other.
To use Ping-Pong buffering, both primary and alternate channel control structures must be used. The
primary control structure for channel 8 is at offset 0x080 of the channel control table, and the alternate
channel control structure is at offset 0x280. The channel control structures for channel 8 are located at the
offsets shown in
.
Table 8-10. Primary and Alternate Channel Control Structure Offsets for Channel 8
Offset
Description
Control Table Base + 0x080
Channel 8 primary source end pointer
Control Table Base + 0x084
Channel 8 primary destination end pointer
Control Table Base + 0x088
Channel 8 primary control word
Control Table Base + 0x280
Channel 8 alternate source end pointer
Control Table Base + 0x284
Channel 8 alternate destination end pointer
Control Table Base + 0x288
Channel 8 alternate control word
8.4.4.2.1 Configure the Source and Destination
The source and destination end pointers must be set to the last address for the transfer (inclusive).
Because the peripheral pointer does not change, it simply points to the peripheral's data register. Both the
primary and alternate sets of pointers must be configured.
1. Program the primary source end pointer at offset 0x080 to the address of the peripheral's receive
buffer.
2. Program the primary destination end pointer at offset 0x084 to the address of ping-pong buffer A +
0x3F.
3. Program the alternate source end pointer at offset 0x280 to the address of the peripheral's receive
buffer.
4. Program the alternate destination end pointer at offset 0x284 to the address of ping-pong buffer B +
0x3F.
The primary control word at offset 0x088 and the alternate control word at offset 0x288 are initially
programmed the same way.
1. Program the primary channel control word at offset 0x088 according to
2. Program the alternate channel control word at offset 0x288 according to
.
Table 8-11. Channel Control Word Configuration for Peripheral Ping-Pong Receive Example
Field in DMACHCTL
Bits
Value
Description
DSTINC
31:30
0
8-bit destination address increment
DSTSIZE
29:28
0
8-bit destination data size
SRCINC
27:26
3
Source address does not increment
SRCSIZE
25:24
0
8-bit source data size
reserved
23:22
0
Reserved
DSTPROT0
21
0
Privileged access protection for destination data writes
reserved
20:19
0
Reserved
SRCPROT0
18
0
Privileged access protection for source data reads
ARBSIZE
17:14
3
Arbitrates after 8 transfers