CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rtos and rtc

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
piti
Guest







rtos and rtc
PostPosted: Tue Mar 03, 2009 11:40 am     Reply with quote

Hi, I'd like to implement following: rtc via timer1 interrupt (i will increment a "second" int32 variable to have a simple rtc implementation, e.g.:

Code:
#int_TIMER1                               
void TIMER1_isr()                         
  Ticker -= 65536;               // Decrement ticker by clocks per interrupt
  if ( Ticker < 65536 )                   // If second has expired
        {  Ticker += TIMER1_FREQUENCY;          //   Increment ticker by clocks per second
         Seconds++;                           //   Increment number of seconds
     // ONE-SECOND TICK) .....)

and to use rtos in parallel as well. Now, how to combine these two routines as I am not sure the rtos tasks e.g.:

#task(rate=1000ms,max=100ms)
void Incr_seconds_rtos_task ( );

will do the timing in a precise manner. Thnx.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group