Direct Memory Access (DMA)
9 - 6
C2000 Microcontroller Workshop - Direct Memory Access Controller
DMA Examples
0x4444
0x0000
0x00004003
0x00004002
0x00004001
0x00004000
0x00000000
0x0000F003
0x0000F002
0x0000F001
0x0000F000
0x00000000
0x3333
0x0000
0x2222
0x0000
0x0000F000
0x1111
0x0000
Simple Example
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
SRC_ADDR_SHADOW
SRC_ADDR
SRC_BURST_STEP
SRC_TRANSFER_STEP
BURST_SIZE*
TRANSFER_SIZE*
Addr
Value
0x1111
0xF000
0x2222
0xF001
0x3333
0xF002
0x4444
0xF003
Source Registers
0x0001
0x0001
0x0001
0x0001
DST_ADDR_SHADOW
DST_ADDR
DST_BURST_STEP
DST_TRANSFER_STEP
Addr
Value
0x4000
0x4001
0x4002
0x4003
Destination Registers
0x00004000
0x0001
0x0001
2 words/burst
2 bursts/transfer
* Size registers are N-1
Objective: Move 4 words from memory location 0xF000 to
memory location 0x4000 and interrupt CPU at end of transfer
Start Transfer
Note: This example could also have been done using 1 word/burst and 4 bursts/transfer, or 4 words/burst
and 1 burst/transfer. This would affect Round-Robin progression, but not interrupts.
Interrupt to PIE
Data Binning Example
ADC Results
L7 SARAM
CH0
CH1
CH2
CH3
CH4
0x0B00
CH0
CH1
CH2
CH3
CH4
CH0
CH1
CH2
CH3
CH4
1
st
Conversion Sequence
0xF000
0xF003
0xF006
0xF009
0xF00C
0x0B01
0x0B02
0x0B03
0x0B04
0xF001
0xF004
0xF007
0xF00A
0xF00D
0xF002
0xF005
0xF008
0xF00B
0xF00E
2
nd
Conversion Sequence
3
rd
Conversion Sequence
CH0
CH1
CH2
CH3
CH4
Objective: Bin 3 samples of 5 ADC channels, then interrupt the CPU
Summary of Contents for C2000 Piccolo LaunchPad
Page 74: ...Interrupts 4 18 C2000 Microcontroller Workshop Reset and Interrupts ...
Page 100: ...Lab 5 System Initialization 5 26 C2000 Microcontroller Workshop System Initialization ...
Page 218: ...Lab 8 IQmath FIR Filter 8 42 C2000 Microcontroller Workshop Numerical Concepts ...
Page 334: ...F28069 controlCARD A 4 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 ...
Page 336: ...F28035 controlCARD A 6 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 SW3 ...