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.

CCS/TMS320F280049C: Use of MotorControlSDK functions on CLA

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE-DIGITALPOWER-SDK, TIDM-1007, TIDM-02002, TIDM-1000

Tool/software: Code Composer Studio

Hi all,

we mainly want to achieve better load sharing between CPU and CLA regarding the control loop. To our knowledge the Estimator functions cannot be executed in the CLA with the currently released MotorControl SDK but we wanted to execute the remaining functions like clarke, pi, traj etc. on the CLA. 

As far as I see it, the inline functions in the headers should not be the problem. Currently the main issue I see are the functions declared in the source files of the different modules. I assume the .c files are automatically build using the CPU compiler and then the linker links the calls used in the CLA code to the CPU code lying in inaccessible memory regions. During debugging I verified that the CLA branches to inaccessible memory at the truncated memory adress of the corresponding function.

The only solution I can currently see is to duplicate all the files prepending a cla_ to all filenames, functions, structs, etc and to rename the cla_*.c files to cla_*.cla so that the CLA compiler is used for them.

Is there a major mistake I did regarding the use of the different modules in the CLA? 

Best regards,

Wolfgang

  • Wolfgang,

    Have you looked at our C2000Ware-DigitalPower-SDK solutions? Many of them are CLA enabled and can run the code between CLA and C28x without any change theoretically, but you do need to comprehend a few things in the architecture.

    We basically use the header files only for the part of code that needs to run on CLA and C28x both. 

    CLAProjectStructureUG.pdf

    Attached is a document that will explain the different steps, please note attached is not a complete set of things you need to do, but at least should serve as guidance. 

    Currently we have 

    TIDM-1007

    TIDM-02002

    TIDM-1000

    in the SDK that use this methodology, and any new solution will use this methodology as well. 

    You can move the source to the .h file and declare the functions as "static inline"

    -Manish 

  • The FAST estimator functions with "EST_" prefix can't be executed on CLA, only on CPU, the other FOC functions are open source code that can be executed on CLA. You may run these codes on CLA as Manish recommended.