DMA Operation
646
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
DMA
Table 11-13. channel_cfg Bit Assignments (continued)
Bit
Name
Description
[3]
next_useburst
Controls if the chnl_useburst_set [C] bit is set to a 1, when the controller is performing a
peripheral scatter-gather and is completing a DMA cycle that uses the alternate data structure.
NOTE: Immediately before completion of the DMA cycle that the alternate data structure
specifies, the controller sets the chnl_useburst_set [C] bit to 0 if the number of remaining
transfers is less than 2
R
. The setting of the next_useburst bit controls if the controller performs an
additional modification of the chnl_useburst_set [C] bit.
In peripheral scatter-gather DMA cycle then after the DMA cycle that uses the alternate data
structure completes, either:
0 = the controller does not change the value of the chnl_useburst_set [C] bit. If the
chnl_useburst_set [C] bit is 0 then for all the remaining DMA cycles in the peripheral scatter-
gather transaction, the controller responds to requests on dma_req[] and dma_sreq[], when it
performs a DMA cycle that uses an alternate data structure.
1 = the controller sets the chnl_useburst_set [C] bit to a 1. Therefore, for the remaining DMA
cycles in the peripheral scatter-gather transaction, the controller only responds to requests on
dma_req[], when it performs a DMA cycle that uses an alternate data structure.
[2:0]
cycle_ctrl
The operating mode of the DMA cycle. The modes are:
000b = Stop. Indicates that the data structure is invalid.
001b = Basic. The controller must receive a new request before entering the arbitration process
to enable the DMA cycle to complete.
010b = Auto-request. The controller automatically inserts a request for the appropriate channel
during the arbitration process. This means that the initial request is sufficient to enable the DMA
cycle to complete.
011b = Ping-pong. The controller performs a DMA cycle using one of the data structures. After
the DMA cycle completes, it performs a DMA cycle using the other data structure. After the DMA
cycle completes and provided that the host processor has updated the original data structure, it
performs a DMA cycle using the original data structure. The controller continues to perform DMA
cycles until it either reads an invalid data structure or the host processor changes the cycle_ctrl
bits to 001b or 010b. See Ping-pong on page 2-23.
100b = Memory scatter-gather (see
). When the controller operates in memory
scatter-gather mode, use this value only in the primary data structure.
101b = Memory scatter-gather (see
). When the controller operates in memory
scatter-gather mode, use this value only in the alternate data structure.
110b = Peripheral scatter-gather (see
). When the controller operates in
peripheral scatter-gather mode, use this value only in the primary data structure.
111b = Peripheral scatter-gather (see
). When the controller operates in
peripheral scatter-gather mode, use this value only in the alternate data structure.
At the start of a DMA cycle, or 2
R
DMA transfer, the controller fetches the channel_cfg from system
memory. After it performs 2
R
, or N, transfers, it stores the updated channel_cfg in system memory.
The controller does not support a dst_size value that is different from the src_size value. If these values
are not equal, the controller uses the src_size value for source and destination and, when it next updates
the n_minus_1 field, it also sets the dst_size field to the same as the src_size field.
After the controller completes the N transfers, it sets the cycle_ctrl field to 000b to indicate that the
channel_cfg data is invalid. This prevents the controller from repeating the same DMA transfer.
11.2.4.4 Address Calculation
To calculate the source address of a DMA transfer, the controller performs a left shift operation on the
n_minus_1 value by a shift amount that src_inc specifies, and then subtracts the resulting value from the
source data end pointer. Similarly, to calculate the destination address of a DMA transfer, it performs a left
shift operation on the n_minus_1 value by a shift amount that dst_inc specifies, and then subtracts the
resulting value from the destination end pointer.
Depending on the value of src_inc and dst_inc, the source address and destination address can be
calculated using the equations:
src_inc = 00b and dst_inc = 00b
•
source address = src_data_end_ptr – n_minus_1
•
destination address = dst_data_end_ptr – n_minus_1