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/TMS320F28377S: Looking for Advice on Sine Generation

Part Number: TMS320F28377S

Tool/software: Code Composer Studio

I need some advice as to which method I should use to generate sine values.   So I know what my options are, but I'm not sure how their performances compare.    I am trying to max out precision and speed, with less care about memory space (ROM or RAM).

Also I was hoping to keep most of the mathematics in CLA program space and leave the CPU free to do communications and task handling.  I will need to call on this sine function (or lookup) consecutively for three unique angular values.

Here are the options I've seen:

1) TMU - Only available to CPU, perhaps it'd be worth passing generated values via message RAM?

2) CLA Math Library - Used specifically in CLA.  I'm wondering how much this might bog down the rest of the calculations

3) IQ Math Library - Not sure if this is limited to CPU or CLA only.  What are the advantages?

4) Straight RAM lookup table of constants with fixed angluar resolution (e.g. 2^16 data points)

Any suggestions or insights would be much appreciated.  Thanks!

--Eric

  • Eric *** said:
    1) TMU - Only available to CPU, perhaps it'd be worth passing generated values via message RAM?

    The calculation on the TMU is the quickest, so this might be a good idea, assuming the overhead with synchronizing the read (i.e. reading the latest value) or passing of flags dont bog it down

    Eric *** said:
    2) CLA Math Library - Used specifically in CLA.  I'm wondering how much this might bog down the rest of the calculations

    This is a table lookup algorithm that is fairly quick, sine takes 28 cycles to compute

    Eric *** said:
    3) IQ Math Library - Not sure if this is limited to CPU or CLA only.  What are the advantages?

    doesnt work on the CLA, the entire IQMath lib is written in C28x assembly

    Eric *** said:
    4) Straight RAM lookup table of constants with fixed angluar resolution (e.g. 2^16 data points)

    Takes 64Kw of storage meaning if you store it in FLASH, the CLA cant access it and will have to rely on the c28x passing it via message ram, or you use up all your RAMLSx/GSx memories to store that table and then you cant use the CLA.