2007-09-17 08:49 PM
2011-05-17 12:46 AM
Hi,
I've this problem: I have to calculate the execution time of an application on the STR9. I tried to use an RTC, but when i print the milliseconds left ( i used RTC_GetTime()), they are always 0. I've fixed the bug in the function gettime, but nothing changed. I used those parameters: RTC_TIME time; RTC_ITConfig(RTC_IT_Per,ENABLE); RTC_CalibClockCmd(ENABLE); RTC_PeriodicIntConfig(RTC_Per_2Hz); time.seconds=0; time.milliseconds=0; time.minutes=0; time.hours=0; RTC_SetTime(time); RTC_GetTime(BINARY,&time); after the gettime, time.milliseconds is always 0 :( I've also uncomment the line #define _RTC , but nothing ... Thank you Marco2011-05-17 12:46 AM
Try reading the Tamper bit. It may have triggered, and will freeze the RTC value until it is cleared. (Happened to me yesterday), Also, make sure you have power on the Vbat pin.