cancel
Showing results for 
Search instead for 
Did you mean: 

Utilizing discover board STM32F407 with FPU

Not applicable

Hello!

I am utilizing discover board STM32F407 with FPU , The board is ARM cortex M-4 based. I want to use FPU to quick the process of conducting exponent calculations and Floating point. I have set down all peripheral drivers that are required for application. Now I want to ask how FPU will be processed for calculation. For its processing do some codes are needed or some library?

I attempted to use HW based FPU in setting but when the process of calculation is conducted the code stops working it got stuck. I am not sure what’s the reason but I think for float calculation either something is wrong with code or the problem is with FPU.

If anyone knows something about this do share and also tell me about software based calculation and also for processing it which library will be suitable?

I am making use of STM32 Cube IDE software.

Thanks

2 REPLIES 2
KnarfB
Principal III

There is no need to do anything special for the FPU. Check the compiler flags in the Console Output, they should contain -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb

For math functions you need to include math.h and check "Use C math library" in the linker settings.

For float input/output (printf and friends) you need to activate "Use float ..." in the MCU Settings.

Additional libraries like CMSIS DSP lib do exist, but it looks like you were not talking about that, just plain FPU use.

If the issues persist, post the code, settings, expected+observed behaviour.

hth

KnarfB

> the code stops working

How? In debugger, observe, where is the program counter.

JW