* [Xenomai-help] Gumstix arm pxa @ 2009-11-07 15:04 Linus Casassa 2009-11-07 16:06 ` Gilles Chanteperdrix 0 siblings, 1 reply; 9+ messages in thread From: Linus Casassa @ 2009-11-07 15:04 UTC (permalink / raw) To: Xenomai help [-- Attachment #1: Type: text/plain, Size: 711 bytes --] Hi. What is the minimum time I can get in a periodic task? My board has an arm pxa 400 MHz processor. I ask because I can't get less time than 200 ms. If I try 10 ms the system hangs and I have to restart the board. I notice that 200 ms are 200 ticks. Is there a way to obtain 1 ms periodic task? The periodic task flips the state of a GIPO so I can measure the accuracy of the periodic task. I noticed that when the system hangs the GPIO continues flipping his state but with a period of 33us when it should be 10ms for example. I am using xenomai 2.9.1 with kernel 2.6.24. Any suggestions? Thanks. -- Linus Casassa Estudiante Ingeniería Civil Electrónica Fono: 56-9-97776941 [-- Attachment #2: Type: text/html, Size: 912 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-07 15:04 [Xenomai-help] Gumstix arm pxa Linus Casassa @ 2009-11-07 16:06 ` Gilles Chanteperdrix 2009-11-08 7:06 ` Linus Casassa 0 siblings, 1 reply; 9+ messages in thread From: Gilles Chanteperdrix @ 2009-11-07 16:06 UTC (permalink / raw) To: Linus Casassa; +Cc: Xenomai help Linus Casassa wrote: > I am using xenomai 2.9.1 with kernel 2.6.24. > > Any suggestions? See: https://mail.gna.org/public/xenomai-core/2009-08/msg00021.html -- Gilles. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-07 16:06 ` Gilles Chanteperdrix @ 2009-11-08 7:06 ` Linus Casassa 2009-11-08 11:23 ` Gilles Chanteperdrix 0 siblings, 1 reply; 9+ messages in thread From: Linus Casassa @ 2009-11-08 7:06 UTC (permalink / raw) To: Xenomai help [-- Attachment #1: Type: text/plain, Size: 1840 bytes --] I applied the patch but I don't see difference. I realised that I wasn't checking the return error so the periodic wait function returns without waiting and the system hangs setting and clearing the GPIO. Obviously... :P The error said that the period is less then /proc/xenomai/latency cat /proc/xenomai/latency 9345 But when I use 200ms the period in ticks is 200 that is less then 9345. This confuses me because 200 works... I tested with 50 ms and it works. Then I tested with 20 ms and it shows the same error. All periods that in ticks are lesser than 10 return error. So I remember that there is a tick argument for the skin. By default it is 1000 so I try with 40. modprobe xeno_native tick_arg=40 And now for the same period I get a bigger number in ticks I can get up to 1,3 ms!! :D I steel don't understand the ticks on xenomai. Where can find info? What is the disadvantage on a small tick_arg? I made a graphic with the acquires measured from an oscilloscope. http://alumnos.elo.utfsm.cl/~lcasassa/1.3ms_xenoTest_sin_carga.png The X axis shows the number of periods And the Y axis the accuracy of each period. The line is the mean of all the data. That is 50us. The part that I don't understand is that the data forms lines parallel the X axis. But I thing that has to do with the tick_arg. Nice work Xenomai!! it is a grate project!! :) On Sat, Nov 7, 2009 at 1:06 PM, Gilles Chanteperdrix < gilles.chanteperdrix@xenomai.org> wrote: > Linus Casassa wrote: > > I am using xenomai 2.9.1 with kernel 2.6.24. > > > > Any suggestions? > > See: > https://mail.gna.org/public/xenomai-core/2009-08/msg00021.html > > -- > Gilles. > -- Linus Casassa Estudiante Ingeniería Civil Electrónica Fono: 56-9-97776941 [-- Attachment #2: Type: text/html, Size: 2491 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-08 7:06 ` Linus Casassa @ 2009-11-08 11:23 ` Gilles Chanteperdrix 2009-11-08 15:28 ` Gilles Chanteperdrix 0 siblings, 1 reply; 9+ messages in thread From: Gilles Chanteperdrix @ 2009-11-08 11:23 UTC (permalink / raw) To: Linus Casassa; +Cc: Xenomai help Linus Casassa wrote: > I applied the patch but I don't see difference. You should use the patch if you want to use an older version of Xenomai. If you want to use Xenomai 2.4.9.1 you have to use one of the patches it contains. Please do that, and test with the "latency" tests included in xenomai to know if your system works correctly. > So I remember that there is a tick argument for the skin. By default it is > 1000 so I try with 40. > > modprobe xeno_native tick_arg=40 No, by default, the skins run in aperiodic mode. > > And now for the same period I get a bigger number in ticks > > I can get up to 1,3 ms!! :D > > I steel don't understand the ticks on xenomai. Where can find info? > What is the disadvantage on a small tick_arg? Periodic ticks are the old ways of handling timer in operating systems. The higher the period, the higher the overhead. However, Xenomai proposes you an aperiodic mode, which is the default. -- Gilles. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-08 11:23 ` Gilles Chanteperdrix @ 2009-11-08 15:28 ` Gilles Chanteperdrix 2009-11-08 17:22 ` Linus Casassa 0 siblings, 1 reply; 9+ messages in thread From: Gilles Chanteperdrix @ 2009-11-08 15:28 UTC (permalink / raw) To: Linus Casassa; +Cc: Xenomai help Gilles Chanteperdrix wrote: > Periodic ticks are the old ways of handling timer in operating systems. > The higher the period, the higher the overhead. However, Xenomai > proposes you an aperiodic mode, which is the default. I mean the higher the frequency, the higher the overhead. -- Gilles. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-08 15:28 ` Gilles Chanteperdrix @ 2009-11-08 17:22 ` Linus Casassa 2009-11-08 17:36 ` Gilles Chanteperdrix 0 siblings, 1 reply; 9+ messages in thread From: Linus Casassa @ 2009-11-08 17:22 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: Xenomai help [-- Attachment #1: Type: text/plain, Size: 811 bytes --] I am using: http://www.xenomai.org/documentation/xenomai-2.4/html/api/trivial-periodic_8c-example.html Is this the right way of doing a periodic task? But it uses aperiodic behind? I thought that periodic has better accuracy. How can I set it? On Sun, Nov 8, 2009 at 12:28 PM, Gilles Chanteperdrix < gilles.chanteperdrix@xenomai.org> wrote: > Gilles Chanteperdrix wrote: > > Periodic ticks are the old ways of handling timer in operating systems. > > The higher the period, the higher the overhead. However, Xenomai > > proposes you an aperiodic mode, which is the default. > > I mean the higher the frequency, the higher the overhead. > > -- > Gilles. > -- Linus Casassa Estudiante Ingeniería Civil Electrónica Fono: 56-9-97776941 [-- Attachment #2: Type: text/html, Size: 1327 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-08 17:22 ` Linus Casassa @ 2009-11-08 17:36 ` Gilles Chanteperdrix 2009-11-09 19:45 ` Stefan Schaal 0 siblings, 1 reply; 9+ messages in thread From: Gilles Chanteperdrix @ 2009-11-08 17:36 UTC (permalink / raw) To: Linus Casassa; +Cc: Xenomai help Linus Casassa wrote: > I am using: > http://www.xenomai.org/documentation/xenomai-2.4/html/api/trivial-periodic_8c-example.html > > Is this the right way of doing a periodic task? But it uses aperiodic > behind? > > I thought that periodic has better accuracy. How can I set it? Please test with the latency test first. And aperiodic has better accuracy. -- Gilles. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-08 17:36 ` Gilles Chanteperdrix @ 2009-11-09 19:45 ` Stefan Schaal 2009-11-09 21:32 ` Gilles Chanteperdrix 0 siblings, 1 reply; 9+ messages in thread From: Stefan Schaal @ 2009-11-09 19:45 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: Xenomai help, Linus Casassa Hi Gilles, if aperiodic has better accuracy, what is the minimal time resolution one can obtain, e.g., on a x86 (I assume that asking for too short a wait can lead to system freezes)? Coming from the vxWorks philosophy, we have been running a 100000ns periodic clock (x86) to work with semaphores and timing statements. Seemingly, you recommend not to use the periodic clock. The rt_timer_ns2ticks and rt_timer_ticks2ns seem to return 0 if the aperiodic clock is used. Is this reasonable, or should they return that ticks and nanoseconds have the same value in this case? Sorry, I am just learning about this different way of using a ROS. -Stefan On Nov 8, 2009, at 9:36, Gilles Chanteperdrix wrote: > Linus Casassa wrote: >> I am using: >> http://www.xenomai.org/documentation/xenomai-2.4/html/api/trivial-periodic_8c-example.html >> >> Is this the right way of doing a periodic task? But it uses aperiodic >> behind? >> >> I thought that periodic has better accuracy. How can I set it? > > Please test with the latency test first. > > And aperiodic has better accuracy. > > -- > Gilles. > > > > _______________________________________________ > Xenomai-help mailing list > Xenomai-help@domain.hid > https://mail.gna.org/listinfo/xenomai-help > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] Gumstix arm pxa 2009-11-09 19:45 ` Stefan Schaal @ 2009-11-09 21:32 ` Gilles Chanteperdrix 0 siblings, 0 replies; 9+ messages in thread From: Gilles Chanteperdrix @ 2009-11-09 21:32 UTC (permalink / raw) To: Stefan Schaal; +Cc: Xenomai help, Linus Casassa Stefan Schaal wrote: > Hi Gilles, > > if aperiodic has better accuracy, what is the minimal time > resolution one can obtain, e.g., on a x86 (I assume that asking for > too short a wait can lead to system freezes)? Coming from the vxWorks The sleep time resolution is bound to the frequency of the hardware timer used. I do not know x86 details that much, but I seem to remember that the 8254 timer, the worst one, has a frequency around 1 MHz, which gives you a resolution of 1us, enough for most uses I believe. > philosophy, we have been running a 100000ns periodic clock (x86) to > work with semaphores and timing statements. Seemingly, you recommend > not to use the periodic clock. The rt_timer_ns2ticks and > rt_timer_ticks2ns seem to return 0 if the aperiodic clock is used. Is > this reasonable, or should they return that ticks and nanoseconds have > the same value in this case? > > Sorry, I am just learning about this different way of using a ROS. either your system is misconfigured (if you have a periodic timer, any time duration smaller than the timer period will give you a duration of 0 ticks, results are rounded toward 0), or there is a bug somewhere. cat /proc/xenomai/timebases will tell you. What xenomai version are you using exactly ? -- Gilles. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-11-09 21:32 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-07 15:04 [Xenomai-help] Gumstix arm pxa Linus Casassa 2009-11-07 16:06 ` Gilles Chanteperdrix 2009-11-08 7:06 ` Linus Casassa 2009-11-08 11:23 ` Gilles Chanteperdrix 2009-11-08 15:28 ` Gilles Chanteperdrix 2009-11-08 17:22 ` Linus Casassa 2009-11-08 17:36 ` Gilles Chanteperdrix 2009-11-09 19:45 ` Stefan Schaal 2009-11-09 21:32 ` Gilles Chanteperdrix
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.