AnsweredAssumed Answered

can not display sprintf to LCD ?

Question asked by H.Rick on Jan 11, 2014
Latest reply on Feb 24, 2014 by H.Rick
Guys,

Why suddenly sprintf doesn't work ?
It was working yesterday, I shut down the power supply now, it's not giving me a good response

code :

uint32_t /*Tmp,*/THH,TMM,TSS,WEEKDAY,DATE,MONTH,YEAR;
 unsigned char date[10],day[10],month[10],year[10],hour[10],min[10],sec[10];

  struct tm *utcTimeSnapshot;
 Tmp = RTC_GetCounter();

TSS = utcTimeSnapshot->tm_sec;
sprintf(sec,"%02d",TSS); 

lcd_string(sec);

If I commented out sprintf, now it's running properly, I can see RTC on USART, but if I use sprintf, it's running 2 seconds and freeze......any ideas ?

Thanks

Outcomes