2012-06-26 03:09 AM
Hi,
I am converting from STM32F205 to STM32F405 and have an issue with printf. I have updated the �C Library, use FPU, and updated OpenRTOS. Are there some settings that I need to change to make printf to work with the following: char buffer[100]; sprintf(buffer,''%.5f'',0.12345); I got a very large number and not 0.12345 Thanks Kai #stm32f4xx2012-06-26 05:42 AM
Presumably it would depend on the compiler, settings, and the libraries selected. Check it has the right FPU settings, as the STM32F4 only supports 32-bit floats natively.
You could try sprintf(buffer, ''%lf'', 0.12345); You should make sure you have a big enough stack.