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.

Using fixed point problem in F28069

Other Parts Discussed in Thread: CONTROLSUITE

I use F28069 and create new project in CCS.

I add IQmath library and .h files in project  and write _IQsinPU(0.5) in main fuction.

Having error after compiler.

I know F28069 having float point math,  but I want to use fixed point math.

How can I do???  Thanks

Below picture is error message:

  • Huang,

    Your project is apparently configured with the -fpu32 compiler option (meaning floating point).  With this option, use the IQmath_fpu32.lib library (in IQmath lib folder in ControlSuite) instead of the regular IQmath.lib.  IQmath.lib is for project NOT built with -fpu32 option.

    Files compiled with -fpu32 are not compatible with files built without -fpu32.  The compiler uses different function parameter passing conventions with and without -fpu32.

    You could alternately get rid of the -fpu32 option, but I would leave it and change the IQmath library instead.  Reason to leave it is you might decide later to do some floating point coding, and for this you want -fpu32.

    The two warnings you're getting about build attribute vendor section missing can be ignored.  That is happening because the IQmath library was built with an older compiler version.  Again, just ignor the warnings.

    Regards,

    David

  • Hi David M. Alter:

    Thanks your reply. But I have a question.

    If I use float point function at F28069, one case is using IQmath library +fixed ponit achieve

    or another case is using IQmath_fpu32 library+float ponit achieve.

    Which one compute performance is better(in motor control field)???

    thanks.
  • Huang,

    Floating pt. is much easier to use than classic fixed pt. programming.  You don't need to deal with the scaling, and things are simple to code in C.  I'm talking about classic fixed pt. (e.g., Q15 type calculations).  IQmath is almost as easy to use as floating pt.  Performance wise (cycle efficiency), floating pt., IQmath, and classic fixed pt. are probably about the same.

    But Huang, you are using a floating pt. processor.  Why not take advantage of the floating pt.?  What is your motivation to even be using IQmath?  If you have existing code in IQmath, all you need to do is set MATH_TYPE = FLOAT_MATH in IQmath.h and all your existing code will pre-process into equivalent floating pt. code.

    Regards,

    David

  • Hi David M. Alter:

    I will use the float point in F28069 and not use the IQmath.

    Thanks you reply my question.