[Rtai] Timer resolution
Paolo Mantegazza
mantegazza at aero.polimi.it
Fri Mar 4 12:36:31 CET 2011
peak peak wrote:
> Hello,
>
> I use periodic mode before calling start_rt_timer.
>
I missed you wanted a hard tick at 1 MHz. It is a wishful hope, that
will just cause an immediate crash, due to a stack overflow.
Take into account that, despite RTAI grabs the timer interrupt directly
at the idt table level, a user task that does just a wait period at 200
KHz consumes almost 40% of the CPU on my PIII 1 GHz, crashing at 300 KHz.
Do not think that a more powerful CPU will be much better. Jitter at the
interrupt level can be even more that 5 us, and it can get even worse on
most recent cpus. The most I've been able to get for an application has
been with a periodic timer at 100 KHz, and to have it reliably I found
it better to stay in kernel space.
paolo
> ------------------------------------------------------------------------
> *From:* Paolo Mantegazza <mantegazza at aero.polimi.it>
> *To:* peak peak <peakpeak05 at yahoo.com>
> *Cc:* Rtai at rtai.org
> *Sent:* Fri, March 4, 2011 8:29:47 AM
> *Subject:* Re: [Rtai] Timer resolution
>
> peak peak wrote:
> > Hello,
> >
> > - I am wondering about timer resolution.
> > In the configuration when compiling the kernel, it is set at the
> maximum of 1KHz
> > On the
> https://www.rtai.org/documentation/kilauea/html/group__timer.html, "The
> resolution is that of the 8254 (1193180 Hz) on a UP machine".
> > Does this relate to each actual CPU's clock speed?
> >
> > - If I use start_rt_timer(nano2count(1000)). Does it mean the
> resolution is 1000 nanoseconds? Increasing the resolution helps reduce
> PC's load (i.e. it runs smoother), doesn't it?
> >
> For an answer, you have to state what mode you set before calling
> start_rt_timer.
>
> paolo
>
> > Thank you in advance!
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Rtai mailing list
> > Rtai at rtai.org <mailto:Rtai at rtai.org>
> > https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rtai mailing list
> Rtai at rtai.org
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
More information about the Rtai
mailing list