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/TMS320F28035: F28035 CLA : MSETFLG RNDF32

Part Number: TMS320F28035

Tool/software: Code Composer Studio

Hi team

I read the following thread:

I know that i could use __asm(“ MSETFLG RNDF32 = 1”); to turn on RNDF32 on the CLA.

But where could i add this code to my project, .c or .cla file? When i added it to .cla file,i got an error:

fatal error #10295:
output section ".text" has both CLA and non-CLA sections; such mixing in the same output section is illegal;

Also,i found the following defines in DSP2803x_Cla.h

struct MSTF_BITS { // bits description
Uint16 LVF:1; // 0 Latched overflow flag
Uint16 LUF:1; // 1 Latched underflow flag
Uint16 NF:1; // 2 Negative float flag
Uint16 ZF:1; // 3 Zero float flag
Uint16 rsvd1:2; // 5,4
Uint16 TF:1; // 6 Test flag
Uint16 rsvd2:2; // 8,7
Uint16 RNDF32:1; // 9 Rounding mode
Uint16 rsvd3:1; // 10
Uint16 MEALLOW:1; // 11 MEALLOW status
Uint16 RPCL:4; // 15:12 Return PC, low portion
Uint16 RPCH:8; // 23:16 Return PC, high portion
Uint16 rsvd4:8; // 31:24
};

The RNDF32 has already be set to 1; Rounding mode

Please help.

  • Hi,

    you should put __asm(“ MSETFLG RNDF32 = 1”); in your CLA task in *.cla file. It should be executed once to set RNDF32. So you may put that line to unused spare CLA task and force SW execution of that task from your CLA initialization code in C file. Like this

    cla:
    __interrupt void Cla1Task2(void) // initialization task
    {
    asm (" MSETFLG RNDF32=1");
    }

    c, somewhere in CLA initialization routine:
    Cla1Regs.MVECT2 = (uint16_t)(&Cla1Task2);

    Cla1Regs.MIER.all = 1<<(2-1); // enable task 2
    Cla1Regs.MCTL.bit.IACKE = 1; // enable SW force task
    Cla1ForceTask2andWait();
  • Susan Yang said:

    But where could i add this code to my project, .c or .cla file? When i added it to .cla file,i got an error:

    fatal error #10295:
    output section ".text" has both CLA and non-CLA sections; such mixing in the same output section is illegal;

    Susan,

    In addition to the information EK provided, please confirm that you are using the latest compiler.  I recommend v18.12.x.LTS - currently x is 2 (18.12.2.LTS).  The compiler will put the CLA functions, from the .cla file, into the Cla1Prog section and not .text. 

    Refer to the compiler reference guide (http://www.ti.com/lit/spru514) for more information.

    I also suggest looking at the CLA FAQ's and resources.  In particular the CLA workshop explains a lot about the CLA. 

    I hope this helps. Please click the "verified answer" button if your issue is resolved. 

     

  • Thans for your support! It helps me a lot !