DMA configured to re-init after transfer (CONTINUOUS = 1)
Ping-Pong Example Register Setup
SRC_BURST_STEP
SRC_TRANSFER_STEP
0x0000
DST_BURST_STEP
DST_TRANSFER_STEP
0x0001
SRC_ADDR_SHADOW
DST_ADDR_SHADOW
BURST_SIZE*
TRANSFER_SIZE*
0x0000
1 word/burst
0x0031
50 bursts/transfer
* Size registers are N-1
Objective: Buffer ADC ch. 0 ping-pong style, 50 samples per buffer
don’t care
since BURST_SIZE = 0
don’t care
since BURST_SIZE = 0
0x00000B00
starting address
0x0000C140
starting address**
Read/Write Data
Add Burst Step
to Address
Pointer
End Transfer
Add Transfer Step
to Address Pointer
Moved
“Burst Size”
Words?
Moved
“Transfer Size”
Bursts?
Y
Y
N
N
Wait for event to
start/continue transfer
Start Transfer
Convert ADC Channel ADCINA0 – 1 conversion per trigger (i.e. ePWM2SOCA)
DMA Registers:
ADC Registers:
Other:
** DST_ADDR_SHADOW must be changed between ping and pong buffer address in
the DMA ISR. Typically use a relocatable symbol in your code, not a hard value.
Channel Priority Modes
Round Robin Mode:
All channels have equal priority
After each enabled channel has
transferred a burst of words, the
next enabled channel is serviced
in round robin fashion
Channel 1 High Priority Mode:
Same as Round Robin except CH1
can interrupt DMA state machine
If CH1 trigger occurs, the current
word (not the complete burst) on
any other channel is completed
and execution is halted
CH1 is serviced for complete burst
When completed, execution
returns to previous active channel
This mode is intended primarily
for the ADC, but can be used by
any DMA event configured to
trigger CH1
DMA
event?
CH6 CH1
CH2CH5
CH4 CH3
Y
N