Dec 19, 2016
07:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2016
07:59 AM
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
4 Replies
Dec 19, 2016
10:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2016
10:23 AM
No ADC readings in Conversion would be my guess. So Conversion =0 . Please post your complete code.
Dec 19, 2016
10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2016
10:40 AM
Check heap size (in System view), must be set to 0x0200 or printing floats goes el wracko.
Bob
Dec 19, 2016
03:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2016
03:34 PM
Try these settings and this program.
Dec 19, 2016
10:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2016
10:30 PM
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