Arm Mbed OS support forum

Printf makes floats wrap-around in the decimals

Hello!
Im trying to read some floats from my board ( nucleo-hy43zi2) using PlatformIO on windows 10.

  • framework-mbed 6.60600.210128 (6.6.0)
  • tool-dfuutil 1.9.200310
  • tool-openocd 2.1000.200630 (10.0)
  • tool-stm32duino 1.0.2
  • toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)

I am have found some weird behaviour. the numbers after the dot will always mirror what the whole numbers are: 16.03 will be printed as 16.000016 , and 3.333333 is printed as 3.000003

I have enabled floats using _printf_float compiler flag.
Does anyone know how to solve this?