This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28379D: CLAmath库CLAsincos、CLAatan2、CLAatan2PU函数使用异常。

Part Number: TMS320F28379D

CLAmath库版本:v4_02_00_00

CLA_lib文件夹除2837x_c1bootROM_CLADataROMSymbols_fpu32.lib、cla1_math_library_datarom_fpu32.lib两个lib文件外,其他lib文件均exclude from build。

processor option中配置--cla_support(cla1)、--float_support(fpu32)

optimization中optimization level(off)、speed_vs_size(2)、floating point mode(strict)、--fp_reassoc(on)

file search path中已添加F021_API_F2837xD_FPU32.lib、f2837xd/common/driverlib/ccs/Realease/driverlib.lib、rts2800_fpu32_fast_supplement_coff.lib、2837x_c1bootROM_CLADataROMSymbols_fpu32.lib、cla1_math_library_datarom_fpu32.lib、rts2800_fpu32.lib

编译过程未报告error错误

我在移植CLAmath库的过程中遇到以下问题:

CLAsin、CLAcos函数均可正常调用切返回正确值;

CLAsincos函数未正常返回结果(sin、cos结果为0,结果变量定义在RAMLS5中)

对CLAatan2、CLAatan2PU函数的测试伪代码如下:(sinValue、cosValue 、Result 定义在RAMLS5中,sinValue、cosValue 也尝试过使用定义在Cla1ToCpuMsgRAM中,无影响)

sinValue = CLAsin(Theta);

cosValue = CLAcos(Theta);

Result = CLAatan2PU(sinValue ,cosValue )

测试输入输出如下:

Theta:      0.3927    —0.7854    —1.1781               —1.5707               —1.9634               —2.3562               —2.7489 ......—4.3196            .......—5.49625

sinValue : 0.3826..  —0.7071..  —0.9238..             —~=1                   —...

cosValue :0.9238..  —0.7071..  —0.3826..             —~=0                   —...

Result:     0             —0             —0.249999985     —0.249999985     —0.249999985     —0.249999985     —0.0        ......—0.249999985 ......  —0.249999985

(上面的—0.249999985中“—”只是分隔号,Result = 0.249999985)

CLAatan2测试结果与CLAatan2PU函数表现一致,Result = 1.57079637