cancel
Showing results for 
Search instead for 
Did you mean: 

How can ı use the FPU (Floating Point Unit) in STM32F407?

msergencatal
Associate II

Hİ. I have been working on motor control applications. There are PID, FOC and SVPWM blocks that have contain functions like sin(), cos(), clarke(), park() etc. I used CMSIS DSP library called "arm_mat.h". My microprocessor is STM32F407 M4. I can control the motor but i want to reduce my execution times. I use STM32CubeIDE. How can ı enable fpu of STM32F407? Maybe it enable but i dont know how can i view fpu enable or disable in STM32CubeIDE?

1 ACCEPTED SOLUTION

Accepted Solutions

The CM4F FPU doesn't support transcendental math functions, or doubles. It only supports relatively simple float (32-bit) operations. Most anything else is in the C compilers math libraries, likely using the FPU to the extent that is practicable.

Typically one selects the use of the FPU on the tool side (check your manual/user guide), GNU has several command line options for hard/soft FP ABI register usage.

On the MCU side, defines passed by the tools usually have code in SystemInit(), or earlier, enable the FPU CoProcessor.

>>Maybe it enable but i dont know how can i view fpu enable or disable in STM32CubeIDE?

Not my tools, but sure this question has been asked/answered several dozen times, search the forum/net for exact details, screenshots, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

The CM4F FPU doesn't support transcendental math functions, or doubles. It only supports relatively simple float (32-bit) operations. Most anything else is in the C compilers math libraries, likely using the FPU to the extent that is practicable.

Typically one selects the use of the FPU on the tool side (check your manual/user guide), GNU has several command line options for hard/soft FP ABI register usage.

On the MCU side, defines passed by the tools usually have code in SystemInit(), or earlier, enable the FPU CoProcessor.

>>Maybe it enable but i dont know how can i view fpu enable or disable in STM32CubeIDE?

Not my tools, but sure this question has been asked/answered several dozen times, search the forum/net for exact details, screenshots, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
msergencatal
Associate II

Thank you .