Hello,
I am looking for an example on how to use FPU multiply instructions on the i.MX RT1010. On the Texas Instruments TM4C series Cortex-M4F the floating point unit is activated, then the 2 float factors are passed to an assembly function that multiplies the values in registers S0, S1 using the FPU multiply instruction VMUL and returns the product to the calling function.
Is it a similar process for the i.MX RT1010? Is there an example in the SDK or could someone please give me an example?
解決済! 解決策の投稿を見る。
Daniel
As long as you have your compiler set up correctly all operations that can be done with FPU instructions should automatically be done so.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Daniel
As long as you have your compiler set up correctly all operations that can be done with FPU instructions should automatically be done so.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Hello Mark,
Thank you for your detailed answer. I didn't see the FPU option in the new project wizard and as you pointed out, all operations involving floats that can be done with FPU instructions are done so automatically if the single precision FPU option is chosen.
On page 28 of the reference manual (found here) it states that the FPU on the i.MX RT1010 is single precision.
Daniel
Daniel
There is a some confusion over the FPU in the 1010 and I haven't used this part enough to have noticed whether double precision would fail or not.
As reference, these are from the 1010 and 1015 User manuals
1010:
1015:
But in their Data sheets:
1010:
1015:
If one selects these two parts in IAR both cause IAR to set double precision FPU (although one can manually change the setting later)
If one uses MCUXpresso SDK examples the 1010 is set with
-mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb
and the 1015 with
-mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb
Since I tend to use the data sheet, rather than user's manual as priority when in doubt, and it states full-featured FPU for both I originally though all i.MX RT has the double precision FPU. Also I think that IAR must believe this too. But, based on SDK reference projects, the SP setting is used in the 1010 case, and so it most likely correct.
Without specifically testing I tend to agree that the i.MX RT 1010 is an exception in not having double precision support, in which case Eric's blog is in fact very relevant to it!!!! I also think that the data sheet to the 1010 part is either wrong or misleading.
Regards
Mark
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Is it a similar process for the i.MX RT1010? Is there an example in the SDK or could someone please give me an example?.
-- In general, it needs two steps to do the multiply operation via FPU module on the i.MX RT1010, firstly, it should enable the FPU module, then utilize the CMSIS-DSP to do the multiply operation.
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------