Lab 9: Servicing the ADC with DMA
9 - 16
C2000 Microcontroller Workshop - Direct Memory Access Controller
This information will be used in the next step.
7.
Modify the end of
Dma.c
to do the following:
- Enable the “
DINTCH1
” interrupt in the PIE (Hint: use the
PieCtrlRegs
structure)
- Enable the appropriate core interrupt in the IER register
8.
Open and inspect
DefaultIsr_9.c
. Notice that this file contains the DMA interrupt
service routine. Save and close all modified files.
Build and Load
9.
Click the “
Build
” button and watch the tools run in the
Console
window. Check for
errors in the
Problems
window.
10.
Click the “
Debug
” button (green bug). The “CCS Debug Perspective” view should
open, the program will load automatically, and you should now be at the start of
main()
. If the device has been power cycled since the last lab exercise, be sure to
configure the boot mode to EMU_BOOT_SARAM using the Scripts menu.
Run the Code – Test the DMA Operation
Note:
For the next step, check to be sure that the jumper wire connecting PWM1A (pin #
GPIO-00) to ADCINA0 (pin # ADC-A0) is in place on the Docking Station.
11.
Run the code in real-time mode using the Script function:
Scripts
Realtime
Emulation Control
Run_Realtime_with_Reset
, and watch the memory
browser update. Verify that the ADC result buffer contains updated values.
12.
Setup a dual-time graph of the filtered and unfiltered ADC results buffer. Click:
Tools
Graph
Dual Time
and set the following values:
Acquisition Buffer Size
50
DSP Data Type
32-bit floating-point
Sampling Rate (Hz)
50000
Start Address – A
AdcBufFilteredIQ
Start Address – B
AdcBufIQ
Display Data Size
50
Time Display Unit
µ
s
13.
The graphical display should show the filtered PWM waveform in the Dual Time A
display and the unfiltered waveform in the Dual Time B display. You should see that the
results match the previous lab exercise.
14.
Fully halt the CPU (real-time mode) by using the Script function:
Scripts
Realtime Emulation Control
Full_Halt
.
Содержание C2000 Piccolo LaunchPad
Страница 74: ...Interrupts 4 18 C2000 Microcontroller Workshop Reset and Interrupts ...
Страница 100: ...Lab 5 System Initialization 5 26 C2000 Microcontroller Workshop System Initialization ...
Страница 126: ...Lab 6 Analog to Digital Converter 6 26 C2000 Microcontroller Workshop Analog to Digital Converter ...
Страница 218: ...Lab 8 IQmath FIR Filter 8 42 C2000 Microcontroller Workshop Numerical Concepts ...
Страница 236: ...Lab 9 Servicing the ADC with DMA 9 18 C2000 Microcontroller Workshop Direct Memory Access Controller ...
Страница 260: ...Lab 10 CLA Floating Point FIR Filter 10 24 C2000 Microcontroller Workshop Control Law Accelerator ...
Страница 331: ...C2000 Microcontroller Workshop Appendix A Experimenter s Kit A 1 Appendix A Experimenter s Kit ...
Страница 334: ...F28069 controlCARD A 4 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 ...
Страница 336: ...F28035 controlCARD A 6 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 SW3 ...
Страница 338: ...F28335 controlCARD A 8 C2000 Microcontroller Workshop Appendix A Experimenter s Kit LD1 LD2 LD3 SW1 ...