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.

Tiva c floating point operations

There seem to be many issues regarding floating point operations on Tiva C series devices(or maybe more specifically the ARM family that they are based on). Is this information gathered into a single location? (Sorry I couldn't find one)

In lieu of that , these are my questions:

1. Can simple (non-DSP)  floating point operations be performed with the Tiva C series device outside of the FPU or should all floating point operations be done with the FPU? (What are the tradeoffs here?) Are there simple examples of floating point operations using FPU and possibly not using FPU?

2. What are the compiler implications/settings for each mode? I am using CCS v6.

I am just looking at float mutiplies and float divides. (No doubles)

Thanks for any help,

-Phil B

  • Hello Phil,

    Since the question is more ARM centric , a good read before questions would be

    infocenter.arm.com/.../BEHFGGGE.html

    Regards
    Amit
  • What issues?

    Robert
  • @Robert,
    "Many" issues - is that not definitive enough for you?     Unsupported (unidentified here) assertions (hearsay?) demonstrate why, "Rules for Evidence" exist.

  • Thanks Amit for the link to ARM documentation about the FPU.

    Is there a description on how to set the correct compiler flags in CCS to enable the FPU or is it enabled by default?

    -Phil B

  • Hello Phil B,

    Enabling the Floating Point Unit requires FPUEnable and FPULazyStackingEnable functions to be called from the fpu.h file with further more reading...

    e2e.ti.com/.../262064

    Regards
    Amit
  • I'm too picky and curious. Wanting to know exactly what faults are so common and numerous that they rate neither a reference or a description, the knowledge of their existence being so common and yet somehow I missed them.

    Robert
  • Amit,
    Thanks for the link. It implies that FPUEnable() does NOT need to be called and that FPULazyStackEnable() should be called before setting SysCtlClockSet() but that only needs to be called if using floating point operations in an ISR. The remaining CCS issues are covered in the project startup_xxx.c file.

    Robert,
    I don't believe I used the word "faults". I clearly mis-worded my initial statement. I should have said questions instead of issues. In my general TI searches regarding floating point operations I see that many others were asking similar questions but I didn't spend the time to match questions/responses with processors to know which ones applied to my own questions or not. That's clearly my fault. If I searched other common topics there could also be such a response as to be quite overwhelming to sift through on the face of it. I'm clearly not knowledgeable on the volume of traffic to make a judgement of whether a certain quantity of questions of a particular topic implies how "common and numerous" these questions/issues/opportunities are.

    -Phil B
  • Hello Phil

    I think you need to call FPUEnable before calling FPULazyStackingEnable

    Regards
    Amit
  • I don't believe I used the word "faults".

    True enough, however, as used issue did appear to be a synonym.

    Call my response a plea to actually describe or point to the issues you are referring to.

    Btw, on the question of initialization, I don't think the cortex aarchitecture is worse than others I've seen forsetting up coprocessors. The documentation could use a little work.

    Robert

    Bah, sorry for the fformatting issues. TI's site has real problems with the platform I'm using to access it. I suspect it's trying to be helpful.
  • Robert Adsett72 said:
    I suspect it's trying to be helpful.

    (i.e. damning w/faint praise...)      Might that same "help" exist w/NMI pin defaults and dreaded 0Ω LPad resistors?

  • Thanks Amit!

    Things are working well now.