EasyManuals Logo

Texas Instruments TMS320F2837 D Series Workshop Guide And Lab Manual

Texas Instruments TMS320F2837 D Series
324 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 #238 background imageLoading...
Page #238 background image
Control Law Accelerator (CLA)
9 - 14 TMS320F2837xD Microcontroller Workshop - Control Law Accelerator
CLA Task C Code Example
#include "Lab.h"
;-------------------------------------
interrupt void Cla1Task1 (void)
{
__mdebugstop();
xDelay[0] = (float32)AdcaResultRegs.ADCRESULT0;
Y = coeffs[4] * xDelay[4];
xDelay[4] = xDelay[3];
xDelay[1] = xDelay[0];
Y = Y + coeffs[0] * xDelay[0];
ClaFilteredOutput = (Uint16)Y;
}
;-------------------------------------
interrupt void Cla1Task2 (void)
{
}
;-------------------------------------
ClaTasks_C.cla
.cla extension
causes the c2000
compiler to invoke
the CLA compiler
All code within this
file is placed in the
section “Cla1Prog”
C Peripheral
Register Header File
references can be
used in CLA C and
assembly code
Closing braces are
replaced with
MSTOP instructions
when compiled
CLA Assembly Language Implementation
CLA Assembly Language
Implementation
Same instruction format as the CPU and FPU
Destination operand on the left
Source operand(s) on the right
Same mnemonics as FPU, with a leading “M
CPU: MPY ACC, T, loc16
FPU: MPYF32 R0H, R1H, R2H
CLA: MMPYF32 MR0, MR1, MR2
Destination Operand
Source Operands

Table of Contents

Other manuals for Texas Instruments TMS320F2837 D Series

Questions and Answers:

Question and Answer IconNeed help?

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

Texas Instruments TMS320F2837 D Series Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320F2837 D Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals