Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4

DeAa_335316
Level 4
First like received
Level 4

Hello,
my program stuck at sprintf function .On UART screen it showing up to ADC3= ... then could not able to print pablisher value..  

   

UART_UartPutString("ADC3=");
 Adc_float=conversion*ADC_FACTOR; 
 sprintf( pablisher,"%.2f",Adc_float); //"%.4f"
 UART_UartPutString(pablisher);

   

Best Regards
Deepak

0 Likes
4 Replies
rola_264706
Level 8
50 likes received 25 likes received 10 likes received
Level 8

No ADC readings in Conversion would be my guess. So Conversion =0 . Please post your complete code.

0 Likes
Bob_Marlowe
Level 10
50 questions asked 10 questions asked 1000 solutions authored
Level 10

Check heap size (in System view), must be set to 0x0200 or printing floats goes el wracko.

   

 

   

Bob

rola_264706
Level 8
50 likes received 25 likes received 10 likes received
Level 8

Try these settings and this program.

   

   

0 Likes
DeAa_335316
Level 4
First like received
Level 4
        Thanks Bob Marlowe.. After changing the heap size it is working fine .. not stuck at run time Bobgoar- First I try your advice but the problem was same