We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.