You are here

Display float value using sprintf not working | Cypress Semiconductor

Display float value using sprintf not working

Summary: 3 Replies, Latest post by bobgoar on 20 Jul 2016 01:18 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
arbj's picture
29 posts


i would like to display the results of a division as a float using sprintf and display it using the UART communication component.

My code is give below.


float ft,db;

char buffer[20];



I don't get any value at all on my terminal program.



I am unable to understand how to display float values using sprintf.

I am using PSOC Creator 3.2



user_1377889's picture
9249 posts

3 steps to success:

Update to latest Creator 3.3 CP3

under Projects-> Build Settings -> Linker: Set Use newlib-nano float formatting to true

in .cydwr view (where you set the pins) "System"-tab: set Heap size to 0x0200



arbj's picture
29 posts

thanks for the quick reply, its working in 3.3, I am able to get the float values displayed.

However there is a problem in the PSOC Creator 3.3 CP3 software.

I have noticed that changes to the font size and style do not get saved, they keep getting back to the default setting.

Also the recent projects list is not updated, no recent projects are displayed. Also the software startup is very slow.

All the above problems surfaced suddenly after the program froze, and I had to restart the computer.

However thanks for your help, I realize I may have to raise a support ticket or something.



user_242978793's picture
960 posts

You are low on resources on your computer Or it is a very slow processor clock.  Try to reinstall the software again.

Log in to post new comments.