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.

TMS320F280041: Proper implementation of trig functions in F280041

Part Number: TMS320F280041

Hello,

I'm using the F280041 in a motor control application where sine, cosine, and arctan functions are being used.  Because the F280041 has a floating point unit and TMU I'm wondering what the best implementation of these trigonometric functions in regards to accuracy and speed.  And, how do I confirm my C code is configured to use that 'best implementation'.  Because of the presence of the FPU most of the working variables are of type float32_t.

Is there a guidance document that can help me understand this?

Thanks - Bruce

  • Bruce,

    To enable/confirm the full suite of co-processor enhancements for the F28004x devices right click on the project and select "properties".  In the pop-up you will want to Expand "Build" ->"C2000 Compiler" then look at both the "Processor Options" and "Optimization" .  I've pasted screen shots of both below as well as the drop downs you want to verify.

    For full FPU32 and TMU instructions you will want fpu32/tmu0 set and floating point mode set to "relaxed"  The following app notes are good to understand the advantages both  FPU and TMU bring to the application:  Let us know if you have further questions.

    Enhancing the Computational Performance of the C2000 Family

    Real-Time Benchmarks on the C2000

    Best,

    Matthew