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:CLAsin ()和 CLAcos ()返回零

Guru**** 2468460 points
Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE, TIDM-02002

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1482900/tms320f28379d-clasin-and-clacos-returns-zero

器件型号:TMS320F28379D
Thread 中讨论的其他器件:controlSUITE、C2000WARE、 TIDM-02002

工具与软件:

尊敬的专家和 Gurus:

我正在努力解决 CLAmath 库问题、其中 CLAsin 和 CLAcos functinos 返回零、尽管我遵循了 CLAmath 用户指南中的说明。 我使用的是 CLAmath 的 v4_02_00_00版本。

以下是我为将 CLAmath 库包含在我的项目中而进行的设置(下图)。



此处是使用 CLAsin 和 CLAcos 的.cla 文件。

#include "F28x_Project.h"
#include "Cla_Support.h"
#include "Solar_CLA.h"
#include "CLAmath.h"

extern float V_alpha,V_beta,R,Y,B,theta2;

interrupt void Cla1Task1 (void)
{
    float ang;
    int i;
    SPLL_3ph_SRF_CLA PLL;
    PARK_CLA park1;



    SPLL_3ph_SRF_CLA_init(50,((float32)(1.0/20000)),PLL);


    if(i>399)
    {
        i=0;
    }
    ang = -3.14159 + (6.283185 * i / 399);
    i = i+1;

    park1.alpha = V_alpha/100;
    park1.beta  = V_beta/100;
    park1.sin =   CLAsin(1.5);
    park1.cos =   CLAcos(2);
    PARK_CLA_MACRO(park1);

    PLL.v_q[0] = (park1.q);
    // SPLL call
    SPLL_3ph_SRF_CLA_MACRO(PLL);


}

请告诉我哪里出了问题。

此致、

Rajesh。