Lab 9: Servicing the ADC with DMA
9 - 14 C2000 Microcontroller Workshop - Direct Memory Access Controller
Lab 9: Servicing the ADC with DMA
Objective
The objective of this lab is to become familiar with operation of the DMA. In the previous lab,
the CPU was used to store the ADC conversion result in the memory buffer during the ADC ISR.
In this lab the DMA will be configured to transfer the results directly from the ADC result
registers to the memory buffer. ADC channel A0 will be buffered ping-pong style with 50
samples per buffer. As an operational test, the filtered 2 kHz, 25% duty cycle symmetric PWM
waveform (ePWM1A) will be displayed using the graphing feature of Code Composer Studio.
Lab 9: Servicing the ADC with DMA
ADC
RESULT0
ePWM2
connector
wire
ADCINA0
data
memory
Display
using CCS
TB Counter
Compare
Action Qualifier
ePWM1
ePWM2 triggering ADC on period
match using SOCA trigger every
20 µs (50 kHz)
Objective:
Configure the DMA to buffer
ADC Channel A0 ping-pong
style with 50 samples per buffer
ping
CPU runs
data through
filter during
DMA ISR
FIR
Filter
pong
data
memory
DMA
Procedure
Open the Project
1. A project named Lab9 has been created for this lab. Open the project by clicking on
Project Import CCS Projects. The “Import CCS Eclipse Projects”
window will open then click Browse… next to the “Select search-directory” box.
Navigate to: C:\C28x\Labs\Lab9\Project and click OK. Then click Finish to
import the project. All build options have been configured the same as the previous lab.
The files used in this lab are: