Paolo Mantegazza wrote:

> 1) - set the timer mode
> 2) - start the real time timer
> 3) do all the rest
> 
> The period you use for a task has nothing to do with the timer period.
> Clearly if the timer is in periodic mode you cannot run a task with a
> period that is less than that of the timer. in periodic mode the period
> of the timer gives you the smaller time resolution you can use.
OK now I get it.
> 
> > > When you do rt_set_periodic you stop any running timer. The sequence is:
> > > rt_set_whatever_mode();
> > > start_rt_timer(....);
> > In the examples directory in the stress module I found following
> > #define ONE_SHOT
> > ...
> > #ifdef ONE_SHOT
> >         rt_set_oneshot_mode();
> > #endif
> >         period = start_rt_timer(nano2count(TICK_TIME));
> >         expected = start = rt_get_time() + 10*period;
> >         rt_task_make_periodic(&thread, start, period);
> > ...
> > Why is here first set the oneshot mode?
> > Also the manual for rt_set_oneshot_mode says that before each
> > start_rt_timer call rt_set_oneshot_mode should be called.
> 
> So what's wrong above? Have I read it correctly or do I need a pair of
> glasses?
> 
Sorry my fault. I wear glasses, but I think I have to clean them from
time to time.

> The answer is also below where it is said the periodic mode is the
> default. So clearly if you want it oneshot you must specifically ask for
> it.
> 
> 
> Ciao, Paolo.

Thanks for your help, I get it now working :-)
Vasili
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to