2019-09-24 06:15 AM
2019-09-24 07:25 AM
It is a micro-controller, it will do whatever the software you construct facilitates.
ARM has CMSIS DSP libraries, other code and libraries presumably can be ported.
2019-09-24 07:35 AM
Almost all toolchains come with the appropriate libraries (soft, softfp and hard).
TI's IQ lib is, AFAIK, more about optimisation.
Besides of certain compiler specific points, it should be easily portable to other Cortex M MCUs. Legal issues aside.
2019-09-24 07:41 AM
Don't know about TI specifics. For the second question, C compilers come with libraries to manage float or double format.
STM32F4 have floating coprocessor (float 32 bit type) by HW
STM32F76x have double floating coprocessor (double 64 bit) by HW
Look into the project compiler properties/settings.
2019-09-24 09:17 AM
I'm not familiar with TI's IQ library, so, if this is off base, my apologies in advance.
Take a look at this post: https://blog.segger.com/floating-point-face-off/. Perhaps that will get you close enough to what you need.
2019-09-24 12:19 PM
Good evening and many thanks for the many, quick answers. Of course, I know that I can write to almost every microcontroller float calculation in C and the compiler translates accordingly.
But that was not the intension of my question and maybe I put it too unspecifically: The TI IQ Math library is an abstract layer, which sets x bits for the integer part according to the selected IQ format and sets y bits for the fractional part. In this way you can calculate with float in an abstract layer, but in the controller itself it does fast fixed-point arithmetic operations.
The calculations are correspondingly faster. An example:
_iq a = _IQ(0.23); // is a handled as a int32_t
_iq b = _IQ(2.87); // is a handled as a int32_t
_iq c = _IQmpy (a, b);
requires less computing time than:
float32_t a = 0.23;
float32_t b = 2.87;
float32_t c = a * b;
on a controller without a HW FPU. And the question refers to a STM32 controller without fpu…
Here I see significant advantages in the use of the IQ Lib of TI on an C2000 or MSP430 in terms of the computing time. Should I be wrong or there are other comparable approaches for a fixed point controller, I would be glad about further answers. Thank you very much.
2019-09-24 12:45 PM
As @Community member mentioned, there are ARM CMSIS DSP libraries and they support fixed point, but I don't think they support a mixture of any precision and mixtures of precision. See AN4841 (https://www.st.com/resource/en/application_note/dm00273990.pdf) and/or the DSP Demo Cube expansion pack (https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-dspdemo.html#resource).