Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] A question about sprintf and displaying to LCD on STM32 ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Visit site
Activity points
9,442
can not display sprintf to LCD ?
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 :

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
 

Effective Embedded C debugging could almost be considered an artform, you gain much of it by experience coupled with studying the capabilities of your compiler and IDE, along with a few tips from other experienced programmers.

A good place to start when utilizing the KEIL MDK-ARM toolset and µVision IDE is the extensive online documentation:

KEIL µVision IDE Online Documentation

KEIL MDK-ARM Product Manuals

There are also a number of KEIL MDK-ARM and µVision IDE tutorials readily available on YouTube.


BigDog
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top