Hi,
I'll try to read some values in the CLA from an other (includet) asm table.
If I load the adress of the value I can see the right one in the memory window. But if I would load this vaule into a variable the varibale will always set 0.
Can anyone tell me whats my mistake?
Here's a part of the code:
;// Include variables and constants that will be shared in the
;// C28x C-code and CLA assembly code. This is accomplished by
;// using .cdecls to include a C-code header file that contains
;// these variables and constants
.cdecls C,LIST,"CLAShared.h"
;// Include the CLA atan Table library. This file has the source
;// for the CLA atan Table used in this program.
; .include "CLAatanTable_type0.asm"
; .include "CLAmathLib_type0.inc"
;// To include an MDEBUGSTOP (CLA breakpoint) as the first instruction
;// of each task, set CLA_DEBUG to 1. Use any other value to leave out
;// the MDEBUGSTOP instruction.
CLA_DEBUG .set 1
;// CLA code must be within its own assembly section and must be
;// even aligned. Note: since all CLA instructions are 32-bit
;// this alignment naturally occurs and the .align 2 is most likely
;// redundant
.sect "Cla1Prog"
_Cla1Prog_Start
.align 2
.
.
_Cla1Task4:
.
.
MMOV16 MAR0,MR2,#_CLAatan2Table+4 ; MAR0 points to A2, this will be used in step 4
MMOVI16 MAR1,#_CLAatan2HalfPITable+2 ; MAR1 points to pi/2, this will be used in step 5
MNOP
MNOP
; Perform Step (4):
; arctan(Ratio) = A0 + Ratio(A1 + A2*Ratio)
MMOV32 MR1,*MAR0[#-2]++ ; MR1 = A2
MMPYF32 MR1,MR1,MR0 ; MR1 = A2*Ratio
|| MMOV32 MR3,*MAR0[#-2]++ ; MR3 = A1
MADDF32 MR3,MR3,MR1 ; MR3 = A1 + A2*Ratio
|| MMOV32 MR1,*MAR0 ; MR1 = A0
MMPYF32 MR3,MR3,MR0 ; MR3 = Ratio*(A1 + A2*Ratio)
MADDF32 MR3,MR1,MR3 ; MR3 = A0 + Ratio*(A1 + A2*Ratio)
|| MMOV32 MR2,@_v1k1 ; MR2 = X (set/clear NF,ZF for use below)
.
.
_Cla1T4End: