cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable FPU in STM32F7

pjn
Associate II
Posted on June 25, 2018 at 14:13

I wanted to use FPU in STM32F7, How to enable FPU.

Also how to check if it gets enabled?

Majerle.Tilen.001

 

#stm32f7-nucleo #fpu
3 REPLIES 3
Posted on June 25, 2018 at 14:52

Usually it is a check-box item in the IDE, in Keil you select in the target options.

Compilers typically take it as a command line option or define.

0690X0000060PH3QAM.jpg

There are defines you can look for, and you can check the co-processor register in the SCB

/* FPU settings ------------------------------------------------------------*/

#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)

SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */

#endif

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
pjn
Associate II
Posted on June 25, 2018 at 18:50

Thank you Clive,

It helped, also do you have any idea for the same on System workbench.

Posted on June 25, 2018 at 19:27

Do these tools not have a manual?

Go look under the project or compiler settings,

MCU Settings->Floating Point Hardware

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