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/TMS320F28069M: CLA math library isn't work

Part Number: TMS320F28069M

Tool/software: Code Composer Studio

Hello,

I use TMS320F28069M board and CLA.

The trigger of CLA is ADC EOC and it is 5kHz.

In the CLA I want to use exponential function so I add "CLAmath.h" file. Also I set include option and file path.

So there is no error but the exponential function isn't work.(No output value)

I think the problem comes from cmd file. Because I changed the MEMORY. I don't know which memory the CLA math function is mapped.

And I attach my cmd file 1145.F28069_CLA_lnk.zip

Thank you

  • Please look at the examples provided in the CLA math library.

    It is likely that the result of the CLAexp() is not in a location write accessible by the CLA. The result of the function needs to be in either CLA data memory, or it needs to be in the CLAtoCPU Message RAM block.

    Hope this helps.
    sal
  • Thank you for reply

    But I already did that.

    The result of the function is in the CLA data memory. and I changed to the CLAtoCPU Message RAM block.

    But It sill same problem....

    And I have one more question. In the cmd file what is different PAGE 0 and PAGE 1?

    Thanks
  • Hi Jong,

    At least two problems in your *.cmd. CLA1mathTables is put to CLA not accessible memory RAMM1. CLA1mathTables contains const tables, which should be like CLA1Prog code be put to flash and copied at startup to CLARAM (RAML1 in your case).

    Something like this

    CLA1mathTables              : LOAD = FLASHD,
                             RUN = RAML1,
                             LOAD_START(_CLA1mathTablesLoadStart),
                             LOAD_END(_CLA1mathTablesLoadEnd),
           RUN_START(_CLA1mathTablesRunStart),
           LOAD_SIZE(_CLA1mathTablesLoadSize),
     

    Then you need to copy these tables from CLA1mathTablesLoadStart to CLA1mathTablesRunStart, like you do for CLA1Prog.

    I wonder why CLA Math lib pdf doesn't mention this, perhaps I don't see it.

    You mentioned you don't know which memory CLA math function is mapped. Just check CLA math lib sources. In CLAexp.asm you have .sect "Cla1Prog"...

    If you changed your cmd and not sure, did you try to debug CLA code? At least checking if any CLA interrupt works using forever loop with __mdebugstop(); in it and connecting debugger? Of course you need to software force that CLA interrupt from CPU. Once it works, from debugger perspective you need to check if CLA1mathTables are visible to CLA and properly initialized

    Regarding PAGE0 / 1. Doesn't change anything. You may put all memories to PAGE0 or all to PAGE1.

    Edward

  • Edward, Good response!

    Jong,
    Yes, you need to make sure the CLA program is linked to run from the CLAProg memory. Make sure that it is either loaded there directly, or copied there by the C28x.

    Also, make sure the CLA data tables are accessible like from the CLA. Similar to the result variable which you seem to understand well.

    Hope this helps.
    sal