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: CLA debugging

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

We have validated our ePWM1 INT ISR code running on C28x, which contain current loop calculate.The ISR running on C28x leads to stable current loop and low iTHD. 

When we test  ISR code running on CLA, the current loop become unstable. The ISR code is the same with C28x. While we adjust PI parameter, the current loop instability can be improved. So we guess unstable situation may come from float variables operation in FPU32 of CLA.

 

1. Is there any difference in handling of floating-point numbers between CLA and C28x?

2.Are there any problems in the library file? We use the latest C2000Ware and library?

 

F28004x_CLADATROM_Symbols_eabi_fpu32.lib

cla1_math_library_datarom_fpu32_eabi.lib

DCL_DF22_C1.asm

DCLCLA.h

  • Minghan Dong said:
    The ISR code is the same with C28x. While we adjust PI parameter, the current loop instability can be improved. So we guess unstable situation may come from float variables operation in FPU32 of CLA.

    One thing to check is in the CLA initialization task that the rounding mode RNDF32, in the MSTF register, is set to 1.  On C28x the compiler does this for you, but on C28x the RNDF32 is 0 by default and the initialization code should change it to 1 to match how the C28x handles rounding.

    This can be done in assembly by:

    MSETFLG             RNDF32=1                                                                           ; round to nearest even

    In C code it can be done by using the __msetflg intrinsic.  Refer to the C Compiler User's Guide under CLA compiler, CLA intrinsics.  (http://www.ti.com/lit/spru514) There is an example that shows how to set the rounding mode in the description of this intrinsic. 

    Minghan Dong said:
    1. Is there any difference in handling of floating-point numbers between CLA and C28x?

    No, if the rounding mode is set the same as described above.

    Minghan Dong said:
    2.Are there any problems in the library file? We use the latest C2000Ware and library?

    There are no known issues. 

    Regards

    Lori