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.

关于CLA数学运算问题

基于28377的CLA数学库调用和运算中,CLAsqrt()可以准确计算出数据,单涉及到三角运算以及反三角运算却均反馈零值,不知道哪里有出错的了????

对应的头文件为:CLAmath.h

包含的库文件为:CLAmath.lib,CLAmath_fpu32.lib

在CLA协处理器中执行的代码有:

cla.CTR0 = EPwm2Regs.TBCTR;
clatocpuvalue0 = CLAsqrt(Coff0); //30 SYSCLK
cla.CTR1 = EPwm2Regs.TBCTR;
clatocpuvalue1 = CLAsin(Coff1); //69 SYSCLK
cla.CTR2 = EPwm2Regs.TBCTR;
//clatocpuvalue2 = CLAcos(Coff2); //73 SYSCLK
cla.CTR3 = EPwm2Regs.TBCTR;
clatocpuvalue3 = CLAasin(Coff3); //42 SYSCLK
cla.CTR4 = EPwm2Regs.TBCTR;
clatocpuvalue4 = CLAacos(Coff4); //49 SYSCLK
cla.CTR5 = EPwm2Regs.TBCTR;
clatocpuvalue5 = __sqrt(Coff5); //18 SYSCLK
cla.CTR6 = EPwm2Regs.TBCTR;
clatocpuvalue6 = CLAatan(Coff6);
cla.CTR7 = EPwm2Regs.TBCTR;
cla.CTR8 = EPwm2Regs.TBCTR;
cla.CTR9 = EPwm2Regs.TBCTR;

在上述运算中只有开方运算是正确的,请教高手指点了???