Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
Hello, I have been using a Discovery board with a CortexM4 from STMicroelectronics(STM32f407), programs are being compiled by gnuarm-none-eabi. Function "printf()" is working very fine(I am using a UART to send characters to a computer) however by the time I try to print a float, program hangs. For example this line is crashing the program:
printf("Value of t = %f\n\r", t);
It only happens with floats, integer and string are being properly printed.
Do you guy s have a clue about how to solve this problem?
Thanks,
Mariano
Hi Mariano,
have you already enabled FPU?
If you have not, please try the following code to enable FPU.
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
Best regards,
Yasuhiko Koumoto.
Thanks yasuhikokoumoto, it really helps, now the program is not hanging.