Pumpkin, Inc.

Pumpkin User Forums

cyclical timers / tasks

If you have a general question or comment regarding Salvo, post it here.

cyclical timers / tasks

Postby jccordill » Mon Feb 25, 2013 11:20 am

I'm new to RTOS and Salvo, first I would like to say I found the user manual to be very helpful for a newbe to RTOS programming, Thanks!
I am a bit confused about cyclical timers, what they are and when one would use them. I did not find an example of their use in the manual,so I'm hopeing someone can take some time to explain their usefulness.
From the description, they seem to be used for tasks that need to run at some periodic rate, but how does that differ from just calling OS_Delay with a fixed value at the end of a task?
Perhaps an app note would be a better place to explain this.
TIA,
Jim C
jccordill
 
Posts: 5
Joined: Mon Dec 06, 2010 12:20 pm

Re: cyclical timers / tasks

Postby Andrew » Mon Feb 25, 2013 1:24 pm

page 274 in the User Manual has an example ...

Cyclic timers are simpler than normal tasks, as the entire function is called cyclicly. A function used as a cyclic timer will take less code space than a task with a call to OS_Delay().
Andrew
Site Admin
 
Posts: 68
Joined: Mon Nov 30, 2009 6:43 pm

Re: cyclical timers / tasks

Postby jccordill » Mon Feb 25, 2013 1:54 pm

Thanks, that makes sense. Can you provide an example, such as Blink led on a port pin?
jccordill
 
Posts: 5
Joined: Mon Dec 06, 2010 12:20 pm

Re: cyclical timers / tasks

Postby jccordill » Mon Feb 25, 2013 2:06 pm

Ok, I found an example under OSCreateCycTmr(). I'll play with the freeware library to see if I can set one up, as it requires timeout support.
Thanks.
jccordill
 
Posts: 5
Joined: Mon Dec 06, 2010 12:20 pm


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest