Other Parts Discussed in Thread: C2000WARE
Hi,
my customer is using CLA to calculate sin and got the waveform below:
The CLA code is:
C28x code is:
write angle to fCpuToCla1_PvCtrl, then software trigger CLATASK1, in CLATASK, calculate sin with CLAsin, and send the value to fCla1ToCpu_TestCla1, and then in the C28x code, we read out the calculated value.
2PI is divided into 384 points, so we draw the picture with 384 data, we can see that there are some data which is obviously wrong.
We tried to add more "nop" in C28x code before reading the sin value but it doesn't help.
If we add more "nop" in CLA code like below:
The waveform becomes this: there is still some error(red line is calculated by CLA, green line is calculated by C28x)
We are using cla0_math_library_fpu32.lib.
What may be wrong?