STm32F401RE: FPU not working
Hi guys,
I really need your help.
I'm trying to divide two numbers.. But the result is still 0. Analyzind the disassembling the commands are not those of FPU unit. I enable the FPU in the Properties/MCU Setting.
Here the simple code:
uint32_t A = __HAL_TIM_GET_CLOCKDIVISION(&htim3)+1; // result is 1
uint32_t B = HAL_RCC_GetPCLK2Freq(); // result is 84000000
float D = A/B; // result is 0
double E = A / B; // result is 0
long double F = A / B; // result is 0
double G = 1 / 5; // result is 0
uint32_t H = 10/3; // result is 3
double I = 10/3; // result is 3

Any ideas
Thanks
