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.

TMS320F280025C: EST_initEst doesn't copy the userParams

Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE

Hello

I am porting a application on the F280049C to the F280025C processor.

So, I have made a copy op the F280049C project and changed the pointers to the f28002x libraries.

For the linker file I started with the linker file from the "universal_motorcontrol_lab_f28002x" example for the F280025 processor.

The program runs except the FAST part, it seems the initialization failed because the motor parameters are not set to the right values.

If I run the program in single step it seems the variable "estHandle" (received from the EST_initEst command) looks it a pointer to "userParams", but if the program runs without break points "estHandle" is set to the reserved memory block RAMLS4

It seems there is a difference in the two linker command files.

In the linker file for the 280049C RAMLS0_1 is reserved for the FAST object and ctrl_data is assigned to RAMGS0_A .

In the linker file for the F280025C RAMLS4 is reserved for the FAST object and ctrl_data is also assigned to RAMLS4.

This works for the "universal_motorcontrol_lab_f28002x" example and the value of "estHandle" is set to 0xA000.

What should the value of "estHandle" be?

Linker command file 280049C:

MEMORY

{

PAGE 0 :

PAGE 1 :

RAMLS0_1 : origin = 0x008000, length = 0x001000 /* Can't be used, reserved for FAST object */

RAMGS0_A : origin = 0x00C000, length = 0x002000

}

SECTIONS

{

sysctrl_data : > RAMGS0_A

ctrl_data : > RAMGS0_A

est_data : > RAMGS0_A

}

Linker command file 280025C:

MEMORY

{

RAMLS4 : origin = 0x0000A000, length = 0x00000600 /* Reserved for FAST 0x5c0 bytes used */

est_data : > RAMLS4 /* FAST */

}

I have tried already a lot of configurations but the result is always a not working estimator.

Please give some advice to solve this problem.

  • You may try to use .cmd file of the universal lab and don't change the RAM assignment. Especially, don't assign any sections to RAMLS4 which is reserved for FAST estHandle.

       RAMLS4          : origin = 0x0000A000, length = 0x00000600

    You should just port the application code from your F280049C project, and don't port any code related to FAST estimator to F280025C project.

  • Thank you,  I have checked all the file again and I found the problem is in the difference between the userParams.h files in:

    1: C2000Ware_MotorControl_SDK_3_03_00_00\libraries\observers\est_lib\include

    2: C2000Ware_MotorControl_SDK_3_03_00_00\libraries\observers\est\include.

    The F280049C application was using the last one.

    When I use the first one for the F280025C, the parameters are initialized correctly, but after a workaround for the error messages, e.g. offsetPole_rps not in userParams structure and a few other similar errors for some other variables about rotor and stator resistance.

    After a workaround for these errors, the parameters are initialized appropriately.

    In the example “universal_motorcontrol_lab_f28002x” example, this workaround is defined by the predefine value of “_SOFT_LIB”.

    What is the difference between these two headers and which one should be used for the 280025C processor.

  • Not any big difference on the FAST API functions between F28004x and F28002x versions. Removing some variables are not used in the F28002x library to save RAM usage, so please refer to the example lab for F28002x, don't migrate the FAST codes from F28004x to F28002x, just port your application codes to F280025C.