Thursday, December 18th 2014, 7:18pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

techharsh

Beginner

Date of registration: Feb 1st 2012

Posts: 8

1

Wednesday, February 1st 2012, 6:21pm

rtc implementation

Hi All,
I have to implement day time (hour,min,sec). I created timer as OS_CREATETIMER (&TIMER1000,tod_Handler,1000). I think, timeout period is in mill second so callback function get called after every 1000 ms (1sec). Hence, Hour, Minute and Second variables get updates in callback function. These three variables are global variables so that I can use these variables to display time. But problem is, second is not incrementing in 1second( obviously, callback is not executed in 1 sec). I doubt thar unit of OS_TIME is not in milli second. Please anybody tell me how to call callback in exactly 1 sec.
Please, also, suggest me other efficient method for implementing RTC. It would be really appreciable.
Regards,
Harsh

This post has been edited 1 times, last edit by "techharsh" (Feb 8th 2012, 8:09am)


techharsh

Beginner

Date of registration: Feb 1st 2012

Posts: 8

2

Friday, February 10th 2012, 8:13am

there is one MACRO in rtosinit.c "OS_FSYS". It should have same value as cpu clock to get 1ms interrupt and also, then OS_TIME will be multiple of 1ms.

Similar threads