For STM32F407 Discovery board how do I enable its FPU from CubeMX?
The following instruction is used in handwritten code. How can I get it generated from CubeMX?
// Enable FPU SCB->CPACR |= 0xf00000;
For STM32F407 Discovery board how do I enable its FPU from CubeMX?
The following instruction is used in handwritten code. How can I get it generated from CubeMX?
// Enable FPU SCB->CPACR |= 0xf00000;
Perhaps the CubeMX is missing this feature and it should add some code in SystemInit.
This is from Keil forum:
void SystemInit(void)
{
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
#endif
..
Somewhere in the compiler/linker you should enable the flags FPU_PRESENT and FPU_USED.