> if source code sets FPU on
How?
> but IDE says FPU off, the FPU is off
How do you know FPU is off?
I don’t use CubeIDE, but my guess would be, that any “FPU on/off” tickbox results in preprocessor symbols being defined/not defined, probably through command-line -Dxxx switch, which are then used in SystemInit()
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
so if your code changes that before SystemInit is called, it will be overriden.
Or not. I don’t Cube.
JW