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.

TMS320F28375D: Mixing assembly instruction and C code in CLA code

Part Number: TMS320F28375D

Hi,

I have a C code written for the CLA task. And I wish to write asm instructions as well.

I want to toggle GPIOs which are gate signals to a power converter. In order to implement delay I want to include the asm("MNOP") instruction in the CLA C code in order to add a timed delay (in ns) between two GPIO toggles (effectively implementing deadband control).

Are there any implications of doing so that I should be aware of.

Second question is about the timing requirement -

I perform a floating point calculation in the cla C code. Will it be worthwhile to try the same calculation in assembly language in terms of execution speed.

Thanks in advance.

Regards,

Anurag

  • Hi Anurag,

    You can mix assembly code in C. That should not be problem

    On your seconf question, rather than writing the asm code directly, I would recommend you write in C, take a look at the compiler generated asm file, and optimize as needed. You can also make use of CLAMath library

    Regards,

    Veena