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.

TMS320F28035: Questions about CLA of F28035

Part Number: TMS320F28035


Dear team:

One of my client have some questions about CLA of F28035.

1, When he puts the motor calculation angle algorithm into the CPU and CLA of TMS320F28035, there will be a constant angle error. And put it in the CPU and CLA of TMS320F28377, there is no angle error.

He wants to know what is the difference in operation mechanism between type-0 and type-1 CLA?

2, He performs PARK calculation in C28 and CLA at the same time.

When performing CLA calculations, he converts the variables to IQ to Float first and then transmits them to CLA for processing, and then converts the results of CLA calculations into IQ format.

Finally, he compared the running result of C28 with the running result of CLA, and found that there was an error, and the error was different between the steady state and the dynamic state of the motor.

May I ask what caused it?

Best regards

  • Hello Green,

    Can you confirm that the exact same application is being compiled and same compiler settings are being applied for TMS320F28377 and TMS320F28035? If so, can you post the compiler settings?

    One suggestion is to check if the CLA bit RND32 (called RNDF32 for F28377)  is configured differently on the two devices. This bit determines how floating point values are rounded off. The TRMs for the devices have more information on this bit.

    Thanks,

    Ashwini

  • Hi Ashwini:

    May I ask which compiler settings should I need to post? Can you list some items?

    Best regards

  • In addition, the RND32 bit of F28035 CLA is set to 0 or 1, which has no effect on the program results.

  • Hi Green,

    I took a second look at the two devices and the TMS320F28377 C28 CPU has an FPU (Floating Point Unit) as well as a TMU (Trigonometric Math Accelerator) where as the TMS320F28035 C28 does not have either of these hardware IPs. The difference being observed with the two platforms is likely due to the C28 difference between these devices.

    Thanks,

    Ashwini

  • Hi Ashwini:

    Regarding this point, my customer replaced the input value of the PI calculation of the motor with the same value, only the format conversion was carried out. But subtracting the calculated results, it is found that the error will increase cumulatively.

    In addition, he considers whether it is a problem of memory read time. When he tested with fixed variables (not tested for dynamic variables), the values of the first few times were the same. Do we have information on the "Read and Write Time of CLA and CPU Common RAM Area"?

    Best regards

  • Hi Green,

    The "CPU and CLA arbitration" section in the TRM should provide some information on this. Do let me know if this is not what you are looking for.

    Also, can you let me know if the customer is trying to port an application from TMS320F28035 to TMS320F28377 or other way around?

    Thanks,

    Ashwini

  • Hi Ashwini, 

    Thank you very much for your reply. My previous account has not been able to reply to your messages. I reapplied for an account to reply. Thank you very much for Green who has been helping me with questions.

    I first used TMS320F28377 for position sensorless control of the motor, and then wrote the algorithm part into the CLA program. Comparing the angle error estimated in CLA and C28x, it is obvious that the angle error is basically zero, but I want to use the same method in When TMS320F28035 was implemented, it was found that the angles estimated in CLA and C28x had an angular error, and the difference was obvious.

    As for the truncation error you mentioned, I have tried to modify this bit without any impact.

    The only thing I can be sure is that the formats used in c28x and CLA in TMS320F28035 are different. C28x uses IQ format, and CLA uses floating point format. However, I have made a comparison about the variables input to the CLA algorithm and c28x, only after the 7th decimal place is different . The single shot test of the algorithm in c28x and CLA has been carried out, and the angle obtained is not much different.

    I really hope you can help me solve this problem, or you can point out where I haven’t considered.

    Thanks,

    Huiwen

  • Hi Huiwen,

    Can you confirm if this is correct understanding of the situation: On F28035 you are seeing some expected angle error between the computation on C28 and CLA. The same code on F29377 you are getting 0 angle error between computation on C28 and CLA which is unexpected.

    It would be helpful if you could share the inputs, outputs and angle error on F28377 and F28035 and indicate what is expected and what is not expected. This may point to something.

    I will reach out to experts as well in the meanwhile.

    Thanks,

    Ashwini

  • Hi Ashwini, 

    Thank you very much for your reply. I may not express the problem clearly. I set the same sensorless control algorithm in CLA and C28, and verified it on both platforms F28035 and F28377, but found that the angle was calculated  same in cla and  C28 on F28377, and the angle calculated by the two on the F28035 platform is different. Theoretically, the angle error obtained by the C28 and cla should be zero, regardless of the platform.

    The attachment is part of my experiment report, I hope it can help me explain the problem I want to describe.

    I would like to ask you and your team for help. If there are other factors I haven't considered.

    Thanks,

    Huiwen

    CLA and CPU angle error on TMS320F28035.pdf

  • Hi Huiwen,

    Thanks for correcting my understanding and sharing the info.

    The following link has some info on the difference between the CLA type-0 and type-1 on the respective devices.

    https://software-dl.ti.com/C2000/docs/cla_software_dev_guide/features.html#cla-types

    Can you check and make sure that the global, local and shared variables used by the CLA on F28035 are mapped to the correct memory bank sections and are initialized correctly.

    If neither of these are the case, the only other option is to step through the code on the CLA on the F28035 while keeping track of variables to determine at what part does the compute on this CLA go wrong.

    The above link also has information on how to debug the CLA.

    Thanks,

    Ashwini