cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX thinks STM32N6 does not have DP-FPU

Bassett.David
Senior

Hello ST,

FYI - It appears CubeMX was not updated since DP-FPU capability was added to the STM32N6 data sheets.

Regards,

Dave

3 REPLIES 3
Ghofrane GSOURI
ST Employee

Hello @Bassett.David 

DP-FPU enables hardware double-precision floating-point calculations. In STM32CubeIDE, it’s activated by selecting FPv5-D16 as the floating-point unit and setting the ABI to Hardware implementation (-mfloat-abi=hard) in the project’s MCU settings.

GhofraneGSOURI_0-1759829013385.png

Additionally, the startup code in system_stm32n6xx_fsbl.c configures the processor’s control registers to grant full access to the FPU by setting CP10 and CP11, ensuring that both secure and non-secure states can use the hardware FPU. Together, these settings guarantee that your application can efficiently execute both single and double-precision floating-point calculations using the microcontroller’s built-in FPU.

  /* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
  SCB->CPACR |= ((3UL << 20U)|(3UL << 22U));  /* set CP10 and CP11 Full Access */

  SCB_NS->CPACR |= ((3UL << 20U)|(3UL << 22U));  /* set CP10 and CP11 Full Access */
#endif /* __FPU_PRESENT && __FPU_USED */

Also 

THX
Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Bassett.David
Senior

Hello Ghofrane,

I must apologize for not being more clear in my report.  What I was noting is that the "MCU Selector" inside CubeMX does not show the STM32N6 when the filter "Core" "FPU" "Double-precision FPU" is checked.  This corresponds to early datasheets for the STM32N6, but I was subsequently informed thet the STM32N6 DOES indeed have DP-FPU (happily!).  I have confirmed this with the latest datasheet.  I believe the selection filter in CubeMX should be updated accordingly.

I'm sorry to have created work for you in your nice response (above).

Regards,

Dave

Hello @Bassett.David 

Thanks for bringing this issue to our attention.

An internal ticket 219691   has been raised to our dev team for resolution .

I will keep you posted with updates.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.