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.

TMS320F28069M: Instaspin and Floating point

Part Number: TMS320F28069M
Other Parts Discussed in Thread: MOTORWARE

Hi,

Using a controller with floating point capability, looking at loads of fixed point code, tried to understand why. Reading the docs it lead me to this:

3.4.1 Header Files, Public Library, and ROM Library

The public library is also known as
the SpinTAC library file. "SpinTAC.lib" is located at /sw/modules/spintac/lib/32b/ and the user must include
this file in the project. If the project requires fpu32 support, use the library file "SpinTAC_fpu32.lib." Note
that this library still uses the fixed point IQMath library.

Does this mean that the binary lib does not use floating point at all, but instead uses fixed point, which eventually means that one needs to use fixed point itself, irrespective whether the controller supports floating point or not ?

The sentence did not make much sense to me and hence my query.

Thanks,

Manu

  • The F28069M with FPU uses SpinTAC_fpu32.lib implementation the IQMath library ( IQmath.lib ) is used to carry out floating-point calculations. This is accomplished by setting the MATH_TYPE in IQmathLib.h to FLOAT_MATH. The SpinTAC library just tested for use with the FastRTS library, so you can't mix instaSPIN-FOC and spinTAC using IQmath_fpu32.lib in the same project. The public motorWare didn't have an example project supporting SpinTAC_fpu32.lib, You'd better to keep using SpinTAC.lib if you need to use instaSPIN-FOC lib also, because 2806xRevB_FastSpinROMSymbols_fpu32.lib uses IQmath_fpu32.lib.
  • Hi Yanming,

    When you use IQmath, you end up using fixed point, rather than the hardware floating point, unless I am mistaken. Don't you ?

    "The IQmath library ports the floating-point algorithm into fixed point code on TMS320C28x devices."

    So, actually there isn't any floating point operation being done, isn't it ? Everything is fixed point calculations, whatever floating point calculations one is doing, in a fixed point library it is all emulated in fixed point. Isn't it ?

    Thanks,

    Manu
  • That means the SPinTAC lib just supports fixed point on F2806x, and instaSPIN-FOC supports both fixed point and float point using different lib. You could use float point without using IQmath lib in your project, but the SpinTAC will use fixed point.
  • What's behind the rationale that the SpinTAC lib implementation uses fixed point, if the hardware supports floating point ?

    Thanks,

    Manu
  • SpinTAC was developed by 3P developer LineStream, not by Texas Instruments. The library was developed for use on F2805x and F2806x devices, but the F2805x does not have an FPU core. That is most likely why there is no FPU support for the F2806x MOTION libraries - they were developed with two devices in mind.

    Sean

  • Hi Sean,

    Ah, compatibility! That clears it up.

    Thanks,

    Manu