EasyManuals Logo

Texas Instruments C2000 Workshop Guide And Lab Manual

Texas Instruments C2000
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #253 background imageLoading...
Page #253 background image
Lab 10: CLA Floating-Point FIR Filter
C2000 Microcontroller Workshop - Control Law Accelerator 10 - 17
Lab 10: CLA Floating-Point FIR Filter
Objective
The objective of this lab is to become familiar with operation and programming of the CLA. In
the previous lab, the CPU was used to filter the ePWM1A generated 2 kHz, 25% duty cycle
symmetric PWM waveform. In this lab, the PWM waveform will be filtered using the CLA. The
CLA will directly read the ADC result register and a task will run a low-pass FIR filter on the
sampled waveform. The filtered result will be stored in a circular memory buffer. Note that the
CLA is operating concurrently with the CPU. As an operational test, the filtered and unfiltered
waveforms will be displayed using the graphing feature of Code Composer Studio.
Lab 10: CLA Floating-Point FIR Filter
CPU copies
result to
buffer during
CLA ISR
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)
CLA
Cla1Task1
Cla1Task2
Cla1Task8
Recall that a task is similar to an interrupt service routine. Once a task is triggered it runs to
completion. In this lab two tasks will be used. Task 1 contains the low-pass filter. Task 8
contains a one-time initialization routine that is used to clear (set to zero) the filter delay chain.
This must be done by the CLA since the CPU does not have access to this array.
Since there are tradeoffs between the conveniences of C programming and the performance
advantages of assembly language programming, three different task scenarios will be explored:
1. Filter and initialization tasks both in C
2. Filter task in assembly, initialization task in C
3. Filter and initialization tasks both in assembly
These three scenarios will highlight the flexibility of programming the CLA tasks, as well as
show the required configuration steps for each. Note that scenarios 1 and 2 are the most likely to
be used in a real application. There is little to be gained by putting the initialization task in
assembly with scenario 3, but it is shown here for completeness as an all-assembly CLA setup.

Table of Contents

Other manuals for Texas Instruments C2000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C2000 and is the answer not in the manual?

Texas Instruments C2000 Specifications

General IconGeneral
BrandTexas Instruments
ModelC2000
CategoryMicrocontrollers
LanguageEnglish

Related product manuals