Gumstix arm pxa
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.
Signature · 3 lines
Linus Casassa Estudiante Ingeniería Civil Electrónica Fono: 56-9-97776941
Quoted 3 lines · Linus Casassa
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
Signature · 1 line
Gilles.
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!! :)
Quoted 11 lines · Gilles Chanteperdrix
Quoted 3 lines · Linus Casassa
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.
Signature · 3 lines
Linus Casassa Estudiante Ingeniería Civil Electrónica Fono: 56-9-97776941
Quoted 1 line · Linus Casassa
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.
Quoted 4 lines
So I remember that there is a tick argument for the skin. By default it is 1000 so I try with 40.
modprobe
xeno_nativetick_arg=40
No, by default, the skins run in aperiodic mode.
Quoted 7 lines
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.
Signature · 1 line
Gilles.
Quoted 3 lines · Gilles Chanteperdrix
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.
Signature · 1 line
Gilles.
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?
Quoted 10 lines · Gilles Chanteperdrix
Quoted 3 lines · Gilles Chanteperdrix
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.
Signature · 3 lines
Linus Casassa Estudiante Ingeniería Civil Electrónica Fono: 56-9-97776941
Quoted 7 lines · Linus Casassa
I am using:
http://www.xenomai.org/documentation/xenomai-2.4/html/api/trivial-periodic_8c-example.htmlIs 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.
Signature · 1 line
Gilles.
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
Quoted 23 lines · Gilles Chanteperdrix
Quoted 7 lines · Linus Casassa
I am using:
http://www.xenomai.org/documentation/xenomai-2.4/html/api/trivial-periodic_8c-example.htmlIs 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.
Signature · 8 lines
Gilles. _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
Quoted 5 lines · Stefan Schaal
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.
Quoted 8 lines
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_ns2ticksandrt_timer_ticks2nsseem 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 ?
Signature · 1 line
Gilles.