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 #240 background imageLoading...
Page #240 background image
Control Law Accelerator (CLA)
9 - 16 TMS320F2837xD Microcontroller Workshop - Control Law Accelerator
CLA Assembly Addressing Modes
Two addressing modes: Direct and Indirect
Both modes can access the lower 64Kx16 of memory only:
All of the CLA data space
Both message RAMs
Shared peripheral registers
Direct Populates opcode field with 16-bit address of the variable
example 1: MMOV32 MR1, @_VarA
example 2:
MMOV32 MR1, @_EPwm1Regs.CMPA.all
Indirect Uses the address in MAR0 or MAR1 to access memory;
after the read or write MAR0/MAR1 is incremented by a
16-bit signed value
example 1:
MMOV32 MR0, *MAR0[2]++
example 2: MMOV32 MR1, *MAR1[-2]++
CLA Task Assembly Code Example
.cdecls "Lab.h"
.sect "Cla1Prog"
_Cla1Task1: ; FIR filter
MUI16TOF32 MR2, @_AdcaResultRegs.ADCRESULT0
MMPYF32 MR2, MR1, MR0
MADDF32 MR3, MR3, MR2
MF32TOUI16 MR2, MR3
MMOV16 @_ClaFilteredOutput, MR2
MSTOP ; End of task
;-------------------------------------
_Cla1Task2:
MSTOP
;-------------------------------------
_Cla1Task3:
MSTOP
ClaTasks.asm
.cdecls directive used
to include the C
header file in the CLA
assembly file
.sect directive used to
place CLA assembly
code in its own
section
C Peripheral Register
Header File references
can be used in CLA
assembly code
MSTOP instruction
used at the end of the
task

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