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.

Switching to Floating point ?

Other Parts Discussed in Thread: MOTORWARE

hello to all,

I'd like to ask if there is any benefit switching to FPU other than execution speed, for example improved precision, smoother operation etc.

I am trying to switch my current fixed point project to FPU. I followed Chris suggestion from another post (http://e2e.ti.com/support/microcontrollers/c2000/f/902/p/260838/912274.aspx#912274) and I just replaced 2806xRevB_FastSpinROMSymbols.lib with 2806xRevB_FastSpinROMSymbols_fpu32.lib but it didn't worked. I checked with an FPU lab and I did the following changes to my project :

- 2806xRevB_FastSpinROMSymbols.lib  replaced with  2806xRevB_FastSpinROMSymbols_fpu32.lib

- IQmath.lib  replaced with IQmath_fpu32.lib

- SpinTAC.lib replaced with SpinTAC_fpu32.lib

- Added Runtime library support -> rts2800_fpu32.lib added to project options

- fpu32 added in processor options

- FLOAT added in predefined symbols

My project compiles with no errors but it doesn't seem to work. Am I missing something ?

Thanks in advance.

  • Angelo,

    You may want to use one of the FPU projects in MotorWare as a starting point. They are already set-up with all correct linked files and build options. That would be the easiest thing to do. For example the order of where the rts2800 library is linked suddenly became important in the latest versions of CCS.

    As for the benefit, using an FPU project just allows your to have floating point variables and math operations in your user code. It may be of benefit if you are doing special trajectory calculations, filtering, etc.  It will actually use more CPU cycles (unless you are currently doing emulated floating point on the fixed point 28x CPU).  The motor control library is all fixed point inside, so it behaves the same regardless if you use FPU or no.