2013-04-14 06:04 PM
Hello All,
I am writing a Scheduler which must handle long delays: from 1s to several days. What would be the easiest way to add, lets say, 10.000 seconds to the current Calendar time?Is there any library to help me with the RTC_TimeTypeDef & RTC_DateTypeDef manipulation or do I have to handle this manually? I feel that manual date handling (and different day count in different months) is going to be time consuming and somewhat redundant.Thanks,Gintas2013-04-14 06:54 PM
The F1 had a 32-bit second counter, and implemented time UNIX style.
The F2/F4 have calendering, you'll have to perform time/date manipulation yourself. Not sure if it's redundant, as there is no direct support that's being replaced. If you're doing such work you should have tools, and routines already validated for such tasks. Cross posted on Keil forum.http://www.keil.com/forum/22853/
2013-04-15 01:10 AM
If you don't need the timer to be battery backed, why not just set up any one of the microcontroller's timers as a one second (100ms / 10ms) counter and use ''linear'' time?