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.

Query related CLA in insta-spin FOC

Other Parts Discussed in Thread: TMS320F28069F, CONTROLSUITE, MOTORWARE

Dear All/ Chris,

I am using TMS320F28069F controller and motorware13 example.

I want to use CLA in my code. Can any one help me how to use CLA in insta-spin?

There is no any CLA related example, API function and driver file in M_13.

Waiting for solution.

-Abbas

  • Abbas,

    Correct, we haven't shown how to use CLA with MotorWare, and I'm not sure we will. It's on the to-do list but wayyyy down the list.  My suggestion would be to familiarize yourself with the CLA process from the examples in controlSUITE.

    C:\ti\controlSUITE\device_support\f2806x\v136\F2806x_examples_cla_ccsv5

    Here's an example of the CLA running PFC while the 28x runs the motor control code:

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVACI_Sensorless_PFC_F2803x

     

    I do know some customers who have integrated CLA use into MotorWare themselves, so it is certainly possible.

     

  • Dear All/Chris,

    Updating on my last query, I was checking "shiftting of debug point" by toggling EPWM7 force fully from clatask1.

    And  found that when I includes "pwm.h" file in CLA, it gives error "Header file <string.h> not supported by CLA compiler".

    And "pwm.h" has "types.h" included and further "types.h" has "string.h". 

    So my main concern is, all the peripheral files(in new object style programming) has "types.h" included, so how can we use peripherals in CLA ?

    PS: I posted here because, I think this query is related to Instaspin more.Waiting for reply.

    Thanks and Regards

    Abbas

  • Abbas,

    The CLA C compiler has certain restrictions on the code it compile.  This is because the CLA lacks some of the normal hardware found on a cpu to support things like branching and context save/restores.  Using the motorware drivers on the CLA is untested and not recommended.

    Chris' advice is correct.  Try looking at this:

    C:\ti\controlSUITE\device_support\f2806x\v136\F2806x_examples_cla_ccsv5

    There are several examples in this directory which show how to use the CLA.  If you copy the Compiler include paths and linker file search path from these examples and add them to your motorware project, you ought to be able to include DSP28x_Project.h and use the controlSUITE header files to access the hardware registers from the CLA.

    I know this isn't an idea solution, and we are aware of this.  We are actively working on unifying the software experience between MotorWare and controlSUITE.

    BR,

  • Hello All/Trey,

    Thanks for replying, I am experimenting on your suggestion. I will update you on this later. But still I have doubts in this, like is it possible that main core is working on new object type programming structure and simultaneously we can access hardware registers through old type method in CLA core. I hope that this solution works.

    Thanks and Regards,

    Abbas

  • Abbas,

    The driver/object oriented programming structure and the old type header files are no different.  They are simply abstractions of the hardware registers.  I guarantee that there are no issues mixing the two styles of register access.

    Where you may have issues is if both the CPU and CLA are trying to access the same register.  There are arbitration mechanisms built in to the chip to help with this, but it's up to your application to properly partition the device's hardware between the CPU and CLA.

    BR,